MCPcopy Create free account
hub / github.com/Heltec-Aaron-Lee/WiFi_Kit_series / parseInt

Method parseInt

libraries/ArduinoOTA/src/ArduinoOTA.cpp:194–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194int 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
212String ArduinoOTAClass::readStringUntil(char end) {
213 String res = "";

Callers

nothing calls this directly

Calls 2

peekMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected