[safe_mode] Use a user provided default constructor for SafeModeComponent (#19163)

This commit is contained in:
J. Nick Koston
2026-09-16 18:22:34 +12:00
committed by GitHub
parent 511095d3da
commit e50428fce5
+3
View File
@@ -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