File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55#include < AsyncJson.h>
66#include < ESPAsyncWebServer.h>
77#include < LittleFS.h>
8+ #include < esp_task_wdt.h>
89#include < og3/constants.h>
910#include < og3/ha_app.h>
1011#include < og3/html_table.h>
2223#include " svelteesp32async.h"
2324#include " watering.h"
2425
25- #define SW_VERSION " 0.9.2 "
26+ #define SW_VERSION " 0.9.3 "
2627
2728namespace {
2829
@@ -471,7 +472,14 @@ void setup() {
471472
472473 // Run the og3 application setup code.
473474 s_app.setup ();
475+
476+ // Initialize Watchdog Timer with 5 second timeout
477+ esp_task_wdt_init (5 , true );
478+ esp_task_wdt_add (NULL ); // Add current thread (loopTask) to WDT
474479}
475480
476481// This is called repeaedly when code is running.
477- void loop () { s_app.loop (); }
482+ void loop () {
483+ s_app.loop ();
484+ esp_task_wdt_reset (); // Reset watchdog timer
485+ }
You can’t perform that action at this time.
0 commit comments