| 192 | } |
| 193 | |
| 194 | int ArduinoOTAClass::parseInt() { |
| 195 | char data[INT_BUFFER_SIZE]; |
| 196 | uint8_t index = 0; |
| 197 | char value; |
| 198 | while (_udp_ota.peek() == ' ') { |
| 199 | _udp_ota.read(); |
| 200 | } |
| 201 | while (index < INT_BUFFER_SIZE - 1) { |
| 202 | value = _udp_ota.peek(); |
| 203 | if (value < '0' || value > '9') { |
| 204 | data[index++] = '\0'; |
| 205 | return atoi(data); |
| 206 | } |
| 207 | data[index++] = _udp_ota.read(); |
| 208 | } |
| 209 | return 0; |
| 210 | } |
| 211 | |
| 212 | String ArduinoOTAClass::readStringUntil(char end) { |
| 213 | String res = ""; |