mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 08:41:59 +00:00
Merge remote-tracking branch 'origin/safe_mode_blocking_on_success' into integration
This commit is contained in:
@@ -141,7 +141,12 @@ uint32_t SafeModeComponent::read_rtc_() {
|
||||
return val;
|
||||
}
|
||||
|
||||
void SafeModeComponent::clean_rtc() { this->write_rtc_(0); }
|
||||
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
|
||||
uint32_t val = 0;
|
||||
this->rtc_.save(&val);
|
||||
}
|
||||
|
||||
void SafeModeComponent::on_safe_shutdown() {
|
||||
if (this->read_rtc_() != SafeModeComponent::ENTER_SAFE_MODE_MAGIC)
|
||||
|
||||
Reference in New Issue
Block a user