Merge pull request #1873 from Specter242/codex/sensecap-solar-led-poweroff-parity

sensecap solar: add poweroff/shutdown support and nrf52 PM parity
This commit is contained in:
ripplebiz 2026-03-12 18:13:14 +11:00 committed by GitHub
commit 792f299986
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 111 additions and 7 deletions

View file

@ -199,7 +199,9 @@ uint8_t CommonCLI::buildAdvertData(uint8_t node_type, uint8_t* app_data) {
}
void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, char* reply) {
if (memcmp(command, "reboot", 6) == 0) {
if (memcmp(command, "poweroff", 8) == 0 || memcmp(command, "shutdown", 8) == 0) {
_board->powerOff(); // doesn't return
} else if (memcmp(command, "reboot", 6) == 0) {
_board->reboot(); // doesn't return
} else if (memcmp(command, "clkreboot", 9) == 0) {
// Reset clock