Commit cde668da authored by lbernstone's avatar lbernstone Committed by Me No Dev

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
parent a59eafbc
...@@ -149,13 +149,13 @@ int ArduinoOTAClass::parseInt(){ ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment