Merge remote-tracking branch 'origin/safe_mode_blocking_on_success' into integration

This commit is contained in:
J. Nick Koston
2025-12-22 10:49:24 -10:00
+4 -2
View File
@@ -142,8 +142,10 @@ uint32_t SafeModeComponent::read_rtc_() {
}
void SafeModeComponent::clean_rtc() {
// Save without sync - preferences will be written at shutdown or by IntervalSyncer
// This avoids blocking the loop for 50+ ms on flash write
// Save without sync - preferences will be written at shutdown or by IntervalSyncer.
// This avoids blocking the loop for 50+ ms on flash write. If the device crashes
// before sync, the boot wasn't really successful anyway and the counter should
// remain incremented.
uint32_t val = 0;
this->rtc_.save(&val);
}