feat(firmware): log reason before FATAL hang loops
Two FATAL while(true) hangs in main.cpp (config load fail, camera init fail) previously relied on the hardware watchdog to reboot the device, leaving the cause invisible beyond a generic TWDT reset reason. Now each path logs EVT_REBOOT with REBOOT_FATAL_CONFIG or REBOOT_FATAL_CAMERA before hanging, so the next heartbeat's recent_events surfaces which branch hung. Server-side decoder updated for the two new enum values. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -122,4 +122,6 @@ REBOOT_REASON_DECODER = {
|
||||
2: "FACTORY_RESET",
|
||||
3: "OTA",
|
||||
4: "WIFI_REPROV",
|
||||
5: "FATAL_CONFIG",
|
||||
6: "FATAL_CAMERA",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user