From 3ea4431b35d2fcefee03c965429cc871a8558e64 Mon Sep 17 00:00:00 2001 From: vk7js <58905135+vk7js@users.noreply.github.com> Date: Wed, 21 Sep 2022 19:17:51 +1000 Subject: [PATCH] Added support for the speaking of callsign when you hit hash key. Fixed issue of callsign and M17 settings strings being in the wrong order in the string table causing the voice prompts to be switched. --- openrtx/include/ui/ui_strings.h | 2 +- openrtx/src/ui/ui.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/openrtx/include/ui/ui_strings.h b/openrtx/include/ui/ui_strings.h index f99c8ae1..0bf88809 100644 --- a/openrtx/include/ui/ui_strings.h +++ b/openrtx/include/ui/ui_strings.h @@ -85,8 +85,8 @@ typedef struct const char* toRestoreFlashAnd; const char* openRTX; const char* gpsSettings; - const char* callsign; const char* m17settings; + const char* callsign; const char* resetToDefaults; const char* toReset; const char* pressEnterTwice; diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index a36dd6e9..d0264026 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -1280,6 +1280,9 @@ void ui_updateFSM(bool *sync_rtx) _ui_textInputConfirm(ui_state.new_callsign); // Save selected dst ID and disable input mode strncpy(state.m17_data.dst_addr, ui_state.new_callsign, 10); + vp_announceBuffer(¤tLanguage->callsign, + false, true, + state.m17_data.dst_addr); ui_state.edit_mode = false; *sync_rtx = true; } @@ -1287,6 +1290,8 @@ void ui_updateFSM(bool *sync_rtx) { // Save selected dst ID and disable input mode strncpy(state.m17_data.dst_addr, "", 1); + vp_announceBuffer(¤tLanguage->callsign, + false, true, "-"); ui_state.edit_mode = false; *sync_rtx = true; } @@ -1333,6 +1338,9 @@ void ui_updateFSM(bool *sync_rtx) ui_state.edit_mode = true; // Reset text input variables _ui_textInputReset(ui_state.new_callsign); + vp_announceBuffer(¤tLanguage->callsign, + true, true, + ""); } else if(msg.keys & KEY_UP || msg.keys & KNOB_RIGHT) {