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:
@@ -66,6 +66,12 @@ public:
|
||||
// List dated log files under logDir as JSON: {"files":[{"name":"2026-07-14.log","size":1234}, ...]}
|
||||
String listLogFilesAsJson(const String& logDir);
|
||||
|
||||
// Deletes every dated log file under logDir (e.g. all of "/logs"). Used
|
||||
// by logs.clear — a QA-to-shipping reset, not part of normal log rotation
|
||||
// (that's pruneLogDirectory(), which only trims oldest files over budget).
|
||||
// Returns the number of files actually deleted.
|
||||
size_t deleteAllLogFiles(const String& logDir);
|
||||
|
||||
// Read a bounded chunk of a log file for remote retrieval (paginated —
|
||||
// callers loop, feeding next_offset back in, until eof is true).
|
||||
// Returns JSON: {"data":"<raw text chunk>","next_offset":N,"eof":bool}
|
||||
|
||||
Reference in New Issue
Block a user