Skip to content

Commit

Permalink
IDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
sblantipodi committed Aug 30, 2024
1 parent bf0a4e4 commit f4ece60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BootstrapManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void BootstrapManager::bootstrapSetup(void (*manageDisconnections)(), void (*man
}
#if defined(ARDUINO_ARCH_ESP32)
esp_task_wdt_config_t twdt_config = {
.timeout_ms = 3000,
.timeout_ms = 50000,
.trigger_panic = true,
};
esp_task_wdt_init(&twdt_config); //enable panic so ESP32 restarts
Expand Down Expand Up @@ -115,7 +115,7 @@ void BootstrapManager::bootstrapSetup(void (*manageDisconnections)(), void (*man
}
#if defined(ARDUINO_ARCH_ESP32)
esp_task_wdt_config_t twdt_config = {
.timeout_ms = 3000,
.timeout_ms = 50000,
.trigger_panic = true,
};
esp_task_wdt_init(&twdt_config); //enable panic so ESP32 restarts
Expand Down
3 changes: 3 additions & 0 deletions src/WifiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ void WifiManager::setupWiFi(void (*manageDisconnections)(), void (*manageHardwar
});
#elif defined(ARDUINO_ARCH_ESP32)
WiFi.setHostname(helper.string2char(deviceName));
#if !CONFIG_IDF_TARGET_ESP32S2
btStop();
#endif
#endif
// Start wifi connection
WiFi.begin(qsid.c_str(), qpass.c_str());
Expand Down Expand Up @@ -224,6 +226,7 @@ void WifiManager::setupOTAUpload() {
Serial.println(F("End"));
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
esp_task_wdt_reset();
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Expand Down
1 change: 1 addition & 0 deletions src/WifiManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <HTTPClient.h>
#include <WiFiUdp.h>
#include <WebServer.h>
#include <esp_task_wdt.h>

#endif

Expand Down

0 comments on commit f4ece60

Please sign in to comment.