Big wheaterstation update #2
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
// Standard ESP8266 libs from project folder
|
// Standard ESP8266 libs from project folder
|
||||||
#include <ESP8266mDNS.h>
|
#include <ESP8266mDNS.h>
|
||||||
#include <ESP8266WiFi.h>
|
#include <ESP8266WiFi.h>
|
||||||
|
#include <esp.h>
|
||||||
|
|
||||||
#include <WiFiClient.h> // WiFiClient
|
#include <WiFiClient.h> // WiFiClient
|
||||||
|
|
||||||
|
@ -132,8 +133,11 @@ void setup() {
|
||||||
#else // not in battery mode
|
#else // not in battery mode
|
||||||
|
|
||||||
#ifdef ENABLE_WATCHDOG
|
#ifdef ENABLE_WATCHDOG
|
||||||
|
wdt_disable();
|
||||||
|
wdt_reset();
|
||||||
// Enable the internal watchdog
|
// Enable the internal watchdog
|
||||||
ESP.wdtEnable(WATCHDOG_TIMEOUT_MS);
|
wdt_enable(WATCHDOG_TIMEOUT_MS);
|
||||||
|
debug("Watchdog enabled");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -358,7 +362,7 @@ void criticalBatCheck() {
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
#ifdef ENABLE_WATCHDOG
|
#ifdef ENABLE_WATCHDOG
|
||||||
ESP.wdtFeed();
|
WDT_FEED();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BATTERY_POWERED
|
#ifdef BATTERY_POWERED
|
||||||
|
|
Loading…
Reference in a new issue