From 376e4367bfba9fc6b8635be2de1c041e7005e646 Mon Sep 17 00:00:00 2001 From: Sherman Perry <14854761+shermp@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:51:01 +1200 Subject: [PATCH] Rename "cx_devices" command to "conn_devices" --- doc/command_protocol.md | 4 ++-- src/asha_bt.cpp | 2 +- src/asha_usb_serial.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/command_protocol.md b/doc/command_protocol.md index a0c3098..f716b43 100644 --- a/doc/command_protocol.md +++ b/doc/command_protocol.md @@ -65,7 +65,7 @@ Note: examples below include whitespace for clarity. They MUST be packed for tra ```json { - "cmd": "cx_devices" + "cmd": "conn_devices" } ``` @@ -73,7 +73,7 @@ Note: examples below include whitespace for clarity. They MUST be packed for tra ```json { - "cmd": "cx_devices", + "cmd": "conn_devices", "devices": [ { "addr": "1A:2B:3C:4D:5E:6F", diff --git a/src/asha_bt.cpp b/src/asha_bt.cpp index 469b98d..dee1251 100644 --- a/src/asha_bt.cpp +++ b/src/asha_bt.cpp @@ -188,7 +188,7 @@ static void handle_stdin_line_worker(async_context_t *context, async_when_pendin settings["uart_enabled"] = runtime_settings.serial_uart_enabled; settings["full_set_paired"] = runtime_settings.full_set_paired; - } else if (cmd_is(SerCmd::CxDevices)) { + } else if (cmd_is(SerCmd::ConnDevices)) { JsonArray devices = resp_doc["devices"].to(); for (auto& ha : ha_mgr.hearing_aids) { JsonObject dev = devices.add(); diff --git a/src/asha_usb_serial.hpp b/src/asha_usb_serial.hpp index 24193bb..b8c1c34 100644 --- a/src/asha_usb_serial.hpp +++ b/src/asha_usb_serial.hpp @@ -8,7 +8,7 @@ namespace asha namespace SerCmd { constexpr const char AshaFWVers[] = "asha_fw_ver"; constexpr const char Status[] = "status"; - constexpr const char CxDevices[] = "cx_devices"; + constexpr const char ConnDevices[] = "conn_devices"; constexpr const char Unpair[] = "unpair"; constexpr const char ClearDevDb[] = "clear_dev_db"; constexpr const char WaitUSBSerCx[] = "wait_usb_ser_cx";