mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 10:38:38 +00:00
[safe_mode] Use a user provided default constructor for SafeModeComponent (#19163)
This commit is contained in:
@@ -17,6 +17,9 @@ constexpr uint32_t RTC_KEY = 233825507UL;
|
||||
/// SafeModeComponent provides a safe way to recover from repeated boot failures
|
||||
class SafeModeComponent final : public Component {
|
||||
public:
|
||||
// User provided, not "= default": `new(p) SafeModeComponent()` would zero-fill .bss that is already zero.
|
||||
SafeModeComponent() {}
|
||||
|
||||
bool should_enter_safe_mode(uint8_t num_attempts, uint32_t enable_time, uint32_t boot_is_good_after, bool in_flash);
|
||||
|
||||
/// Set to true if the next startup will enter safe mode
|
||||
|
||||
Reference in New Issue
Block a user