From e8390ebc7b24f70b5903b5b9e594fb1e26602f25 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 16 Feb 2025 15:24:46 +1300 Subject: [PATCH] added CMD_REBOOT to companion radio --- examples/companion_radio/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 336f788c..1536a3a3 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -110,6 +110,7 @@ static uint32_t _atoi(const char* sp) { #define CMD_SHARE_CONTACT 16 #define CMD_EXPORT_CONTACT 17 #define CMD_IMPORT_CONTACT 18 +#define CMD_REBOOT 19 #define RESP_CODE_OK 0 #define RESP_CODE_ERR 1 @@ -788,6 +789,8 @@ public: _phy->setOutputPower(_prefs.tx_power_dbm); writeOKFrame(); } + } else if (cmd_frame[0] == CMD_REBOOT) { + board.reboot(); } else { writeErrFrame(); MESH_DEBUG_PRINTLN("ERROR: unknown command: %02X", cmd_frame[0]);