Merge pull request #2765 from fizzyfuzzle/ESP32-Reset-Reason

Add ESP32 Reset Reason to existing pwrmgt.bootreason cli command
This commit is contained in:
ripplebiz
2026-06-23 11:41:57 +10:00
committed by GitHub
2 changed files with 36 additions and 4 deletions
-4
View File
@@ -953,13 +953,9 @@ void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* rep
strcpy(reply, "ERROR: Power management not supported");
#endif
} else if (memcmp(config, "pwrmgt.bootreason", 17) == 0) {
#ifdef NRF52_POWER_MANAGEMENT
sprintf(reply, "> Reset: %s; Shutdown: %s",
_board->getResetReasonString(_board->getResetReason()),
_board->getShutdownReasonString(_board->getShutdownReason()));
#else
strcpy(reply, "ERROR: Power management not supported");
#endif
} else if (memcmp(config, "pwrmgt.bootmv", 13) == 0) {
#ifdef NRF52_POWER_MANAGEMENT
sprintf(reply, "> %u mV", _board->getBootVoltage());