Skip to content

Commit

Permalink
Merge pull request #13 from peteh/bugfix/ota-watchdog-reset
Browse files Browse the repository at this point in the history
FIX: call watchdog during ota update
  • Loading branch information
peteh authored Jan 27, 2024
2 parents 4e2984b + 0ffcee7 commit 9be9ce9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doorman/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "html.h"
#include "mqttview.h"


const uint WATCHDOG_TIMEOUT_S = 30;

WiFiClient net;
Expand Down Expand Up @@ -507,7 +506,10 @@ void setup()
ArduinoOTA.onEnd([]()
{ log_info("End"); });
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total)
{ log_info("Progress: %u%%\r", (progress / (total / 100))); });
{
// reset watchdog during update
esp_task_wdt_reset();
log_info("Progress: %u%%\r", (progress / (total / 100))); });
ArduinoOTA.onError([](ota_error_t error)
{
log_error("Error[%u]: ", error);
Expand Down

0 comments on commit 9be9ce9

Please sign in to comment.