Big wheaterstation update #2

Closed
klaute wants to merge 19 commits from master into feature/http_call_send_json
Showing only changes of commit 0f6934f4a1 - Show all commits

View file

@ -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