ArduinoOTA endless loop (#1533)
* Changed pinmap to show pins34-39 as GPI * ArduinoOTA could have endless loop b/c udp.read can return negative result
This commit is contained in:
parent
a59eafbc9d
commit
cde668dada
@ -149,13 +149,13 @@ int ArduinoOTAClass::parseInt(){
|
||||
|
||||
String ArduinoOTAClass::readStringUntil(char end){
|
||||
String res = "";
|
||||
char value;
|
||||
int value;
|
||||
while(true){
|
||||
value = _udp_ota.read();
|
||||
if(value == '\0' || value == end){
|
||||
if(value <= 0 || value == end){
|
||||
return res;
|
||||
}
|
||||
res += value;
|
||||
res += (char)value;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user