Skip to content

Commit 86936f2

Browse files
committed
Move enableWDT to after wifi connection for all platforms
1 parent 2475f33 commit 86936f2

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/Wippersnapper.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,11 +2748,6 @@ void Wippersnapper::connect() {
27482748
// Dump device info to the serial monitor
27492749
printDeviceInfo();
27502750

2751-
// enable global WDT
2752-
#ifndef ARDUINO_ARCH_RP2040
2753-
WS.enableWDT(WS_WDT_TIMEOUT);
2754-
#endif
2755-
27562751
// Generate device identifier
27572752
if (!generateDeviceUID()) {
27582753
haltError("Unable to generate Device UID");
@@ -2774,11 +2769,9 @@ void Wippersnapper::connect() {
27742769
WS_DEBUG_PRINTLN("Running Network FSM...");
27752770
// Run the network fsm
27762771
runNetFSM();
2777-
#ifdef ARDUINO_ARCH_RP2040
2778-
WS.enableWDT(WS_WDT_TIMEOUT); // wifi multi doesn't feed the WDT
2779-
#else
2780-
WS.feedWDT();
2781-
#endif
2772+
2773+
// Enable WDT after wifi connection as wifiMulti doesnt feed WDT
2774+
WS.enableWDT(WS_WDT_TIMEOUT);
27822775

27832776
#ifdef USE_DISPLAY
27842777
WS._ui_helper->set_load_bar_icon_complete(loadBarIconCloud);

0 commit comments

Comments
 (0)