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:
lbernstone 2018-06-27 00:06:02 -07:00 committed by Me No Dev
parent a59eafbc9d
commit cde668dada

View File

@ -149,13 +149,13 @@ int ArduinoOTAClass::parseInt(){
String ArduinoOTAClass::readStringUntil(char end){ String ArduinoOTAClass::readStringUntil(char end){
String res = ""; String res = "";
char value; int value;
while(true){ while(true){
value = _udp_ota.read(); value = _udp_ota.read();
if(value == '\0' || value == end){ if(value <= 0 || value == end){
return res; return res;
} }
res += value; res += (char)value;
} }
return res; return res;
} }