From 4ee4cb656d9fe1e835017bd18b07b76a1b360b7d Mon Sep 17 00:00:00 2001 From: marcoSchr <49691247+marcoSchr@users.noreply.github.com> Date: Tue, 13 Jun 2023 09:02:50 +0200 Subject: [PATCH] Check if in M17 mode before entering destination callsign edit --- openrtx/src/ui/default/ui.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/openrtx/src/ui/default/ui.c b/openrtx/src/ui/default/ui.c index 03a90a12..32bef35e 100644 --- a/openrtx/src/ui/default/ui.c +++ b/openrtx/src/ui/default/ui.c @@ -1346,12 +1346,16 @@ void ui_updateFSM(bool *sync_rtx) } else if(msg.keys & KEY_HASH) { - // Enable dst ID input - ui_state.edit_mode = true; - // Reset text input variables - _ui_textInputReset(ui_state.new_callsign); - vp_announceM17Info(NULL, ui_state.edit_mode, - queueFlags); + // Only enter edit mode when using M17 + if(state.channel.mode == OPMODE_M17) + { + // Enable dst ID input + ui_state.edit_mode = true; + // Reset text input variables + _ui_textInputReset(ui_state.new_callsign); + vp_announceM17Info(NULL, ui_state.edit_mode, + queueFlags); + } } else if(msg.keys & KEY_UP || msg.keys & KNOB_RIGHT) { @@ -1520,10 +1524,14 @@ void ui_updateFSM(bool *sync_rtx) } else if(msg.keys & KEY_HASH) { - // Enable dst ID input - ui_state.edit_mode = true; - // Reset text input variables - _ui_textInputReset(ui_state.new_callsign); + // Only enter edit mode when using M17 + if(state.channel.mode == OPMODE_M17) + { + // Enable dst ID input + ui_state.edit_mode = true; + // Reset text input variables + _ui_textInputReset(ui_state.new_callsign); + } } else if(msg.keys & KEY_F1) {