[safe_mode] Remove unnecessary blocking sync from successful boot reset

This commit is contained in:
J. Nick Koston
2025-12-22 10:48:10 -10:00
parent 145d09c8dd
commit 029df4ff3d
+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);
}