Skip to content

Commit

Permalink
Flash red in case of HW failure
Browse files Browse the repository at this point in the history
  • Loading branch information
PBrunot committed May 18, 2024
1 parent 28d1bf4 commit 578b53c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SavedConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ namespace fabomatic

auto SavedConfig::IncrementBootCount() -> size_t
{
SavedConfig config = LoadFromEEPROM().value_or(DefaultConfig());
auto config = LoadFromEEPROM().value_or(DefaultConfig());
config.bootCount++;
if (!config.SaveToEEPROM())
{
Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ void setup()
{
logic.changeStatus(Status::ErrorHardware);
logic.beepFail();
logic.blinkLed();
logic.blinkLed(64, 0, 0);
ESP_LOGE(TAG, "Hardware initialization failed");
}
else
Expand All @@ -603,6 +603,7 @@ void setup()
esp_task_wdt_add(NULL); // add current thread to WDT watch
while (true)
{
logic.blinkLed(64, 0, 0);
fabomatic::Tasks::delay(1s);
ESP_LOGE(TAG, "Hardware failed, waiting for OTA");
}
Expand Down

0 comments on commit 578b53c

Please sign in to comment.