diff --git a/firmware/firmware.ino b/firmware/firmware.ino index a42930e..14d7dae 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -1,6 +1,7 @@ // Standard ESP8266 libs from project folder #include #include +#include #include // WiFiClient @@ -132,8 +133,11 @@ void setup() { #else // not in battery mode #ifdef ENABLE_WATCHDOG + wdt_disable(); + wdt_reset(); // Enable the internal watchdog - ESP.wdtEnable(WATCHDOG_TIMEOUT_MS); + wdt_enable(WATCHDOG_TIMEOUT_MS); + debug("Watchdog enabled"); #endif #endif } @@ -358,7 +362,7 @@ void criticalBatCheck() { void loop() { #ifdef ENABLE_WATCHDOG - ESP.wdtFeed(); + WDT_FEED(); #endif #ifdef BATTERY_POWERED