From 4e8d6de7d7e63492e694a890337fe7a462bb79b8 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Wed, 5 Feb 2025 11:13:39 +1100 Subject: [PATCH] * companion radio: CMD_GET_DEVICE_TIME now responds with RESP_CODE_CURR_TIME(9) instead of RESP_CODE_OK --- examples/companion_radio/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 93192783..9444e4f4 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 RESP_CODE_SENT 6 // reply to CMD_SEND_TXT_MSG #define RESP_CODE_CONTACT_MSG_RECV 7 // a reply to CMD_SYNC_NEXT_MESSAGE #define RESP_CODE_CHANNEL_MSG_RECV 8 // a reply to CMD_SYNC_NEXT_MESSAGE +#define RESP_CODE_CURR_TIME 9 // a reply to CMD_GET_DEVICE_TIME // these are _pushed_ to client app at any time #define PUSH_CODE_ADVERT 0x80 @@ -562,7 +563,7 @@ public: writeOKFrame(); } else if (cmd_frame[0] == CMD_GET_DEVICE_TIME) { uint8_t reply[5]; - reply[0] = RESP_CODE_OK; + reply[0] = RESP_CODE_CURR_TIME; uint32_t now = getRTCClock()->getCurrentTime(); memcpy(&reply[1], &now, 4); _serial->writeFrame(reply, 5);