sensecap solar: add poweroff command and board power/LED parity

Этот коммит содержится в:
Specter242
2026-02-27 22:12:12 -05:00
родитель eeae32b25d
Коммит e323755990
6 изменённых файлов: 89 добавлений и 7 удалений
+3 -1
Просмотреть файл
@@ -194,7 +194,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