feat(Telemetry,FileManager,LoggingHandler): QA-to-shipping stats reset — telemetry.reset_boot_data + logs.clear
Console wants a "reset device stats before shipping" button for staff to clear QA-bench data (test reboots, debug log spam) without wiping actual device configuration. telemetry.reset_strikes and telemetry.reset_metrics already covered bell strikes and runtime/playback counters — this adds the two gaps: lifetime boot count + SD boot history, and SD debug logs. Deliberately does not touch FirmwareValidator's NVS namespace (rollback safety state, not history) or device identity NVS (serial/hw_family). Verified: pio run on all four board variants.
This commit is contained in:
@@ -222,6 +222,15 @@ public:
|
||||
// "how many times has this device rebooted, ever."
|
||||
uint32_t getLifetimeBootCount() const { return lifetimeBootCount; }
|
||||
|
||||
// Resets the lifetime boot counter (NVS) to 0 and deletes the SD boot
|
||||
// history log — used before shipping a device to a customer, to clear
|
||||
// reboot counts accumulated during QA/bench testing. Does NOT touch
|
||||
// FirmwareValidator's separate "fw_validator" NVS namespace (rollback
|
||||
// safety state, not history). Returns false if the NVS write failed;
|
||||
// the SD-side deletion is always best-effort and doesn't affect the
|
||||
// return value.
|
||||
bool resetBootData();
|
||||
|
||||
// Most recent crash's coredump summary (task name, PC, exception cause/vaddr),
|
||||
// if one was captured. available == false when the last reset wasn't a crash,
|
||||
// or no coredump was found for one that was.
|
||||
|
||||
Reference in New Issue
Block a user