mirror of
https://github.com/scottchiefbaker/ESP-WebOTA.git
synced 2024-08-30 18:12:33 +00:00
BUGFIX: Use unsigned variables for things that can't be negative (#8)
This commit is contained in:
parent
ca6c74bf17
commit
323ccbead5
@ -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();
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user