Skip to content

Commit

Permalink
Move enableWDT to after wifi connection for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Dec 20, 2024
1 parent 2475f33 commit 86936f2
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2748,11 +2748,6 @@ void Wippersnapper::connect() {
// Dump device info to the serial monitor
printDeviceInfo();

// enable global WDT
#ifndef ARDUINO_ARCH_RP2040
WS.enableWDT(WS_WDT_TIMEOUT);
#endif

// Generate device identifier
if (!generateDeviceUID()) {
haltError("Unable to generate Device UID");
Expand All @@ -2774,11 +2769,9 @@ void Wippersnapper::connect() {
WS_DEBUG_PRINTLN("Running Network FSM...");
// Run the network fsm
runNetFSM();
#ifdef ARDUINO_ARCH_RP2040
WS.enableWDT(WS_WDT_TIMEOUT); // wifi multi doesn't feed the WDT
#else
WS.feedWDT();
#endif

// Enable WDT after wifi connection as wifiMulti doesnt feed WDT
WS.enableWDT(WS_WDT_TIMEOUT);

#ifdef USE_DISPLAY
WS._ui_helper->set_load_bar_icon_complete(loadBarIconCloud);
Expand Down

0 comments on commit 86936f2

Please sign in to comment.