diff --git a/src/WebOTA.cpp b/src/WebOTA.cpp index 0a2005c..a00571f 100644 --- a/src/WebOTA.cpp +++ b/src/WebOTA.cpp @@ -201,8 +201,8 @@ int WebOTA::add_http_routes(WebServer *server, const char *path) { // If the MCU is in a delay() it cannot respond to HTTP OTA requests // We do a "fake" looping delay and listen for incoming HTTP requests while waiting -void WebOTA::delay(int ms) { - int last = millis(); +void WebOTA::delay(unsigned int ms) { + unsigned int last = millis(); while ((millis() - last) < ms) { OTAServer.handleClient(); diff --git a/src/WebOTA.h b/src/WebOTA.h index 794a90c..801f60d 100644 --- a/src/WebOTA.h +++ b/src/WebOTA.h @@ -16,7 +16,7 @@ class WebOTA { int init(const unsigned int port, const char *path); int init(const unsigned int port); int init(); - void delay(int ms); + void delay(unsigned int ms); #ifdef ESP8266 int add_http_routes(ESP8266WebServer *server, const char *path);