Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@ upload_port = /dev/cu.usbmodem1201
[env:raspberypi_picow]
extends = common:rp2040

[env:raspberypi_picow_debug_port_only]
extends = common:rp2040
build_flags =
-DUSE_TINYUSB
-DDEBUG_RP2040_PORT=Serial

[env:raspberypi_picow_debug]
extends = common:rp2040
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
Expand Down
7 changes: 3 additions & 4 deletions src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2748,9 +2748,6 @@ void Wippersnapper::connect() {
// Dump device info to the serial monitor
printDeviceInfo();

// enable global WDT
WS.enableWDT(WS_WDT_TIMEOUT);

// Generate device identifier
if (!generateDeviceUID()) {
haltError("Unable to generate Device UID");
Expand All @@ -2772,7 +2769,9 @@ void Wippersnapper::connect() {
WS_DEBUG_PRINTLN("Running Network FSM...");
// Run the network fsm
runNetFSM();
WS.feedWDT();

// 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
7 changes: 6 additions & 1 deletion src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,12 @@ typedef enum {
FSM_NET_ESTABLISH_MQTT,
} fsm_net_t;

#define WS_WDT_TIMEOUT 60000 ///< WDT timeout
#ifdef ARDUINO_ARCH_RP2040
#define WS_WDT_TIMEOUT 8388 ///< RP2040 Max WDT timeout
#else
#define WS_WDT_TIMEOUT 60000 ///< WDT timeout
#endif

#define WS_MAX_ALT_WIFI_NETWORKS 3 ///< Maximum number of alternative networks
/* MQTT Configuration */
#define WS_KEEPALIVE_INTERVAL_MS \
Expand Down
Loading