Check if in M17 mode before entering destination callsign edit

This commit is contained in:
marcoSchr 2023-06-13 09:02:50 +02:00 committed by GitHub
parent b14dd86728
commit 4ee4cb656d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 10 deletions

View File

@ -1345,6 +1345,9 @@ void ui_updateFSM(bool *sync_rtx)
} }
} }
else if(msg.keys & KEY_HASH) else if(msg.keys & KEY_HASH)
{
// Only enter edit mode when using M17
if(state.channel.mode == OPMODE_M17)
{ {
// Enable dst ID input // Enable dst ID input
ui_state.edit_mode = true; ui_state.edit_mode = true;
@ -1353,6 +1356,7 @@ void ui_updateFSM(bool *sync_rtx)
vp_announceM17Info(NULL, ui_state.edit_mode, vp_announceM17Info(NULL, ui_state.edit_mode,
queueFlags); queueFlags);
} }
}
else if(msg.keys & KEY_UP || msg.keys & KNOB_RIGHT) else if(msg.keys & KEY_UP || msg.keys & KNOB_RIGHT)
{ {
// Increment TX and RX frequency of 12.5KHz // Increment TX and RX frequency of 12.5KHz
@ -1519,12 +1523,16 @@ void ui_updateFSM(bool *sync_rtx)
state.ui_screen = MAIN_VFO; state.ui_screen = MAIN_VFO;
} }
else if(msg.keys & KEY_HASH) else if(msg.keys & KEY_HASH)
{
// Only enter edit mode when using M17
if(state.channel.mode == OPMODE_M17)
{ {
// Enable dst ID input // Enable dst ID input
ui_state.edit_mode = true; ui_state.edit_mode = true;
// Reset text input variables // Reset text input variables
_ui_textInputReset(ui_state.new_callsign); _ui_textInputReset(ui_state.new_callsign);
} }
}
else if(msg.keys & KEY_F1) else if(msg.keys & KEY_F1)
{ {
if (state.settings.vpLevel > vpBeep) if (state.settings.vpLevel > vpBeep)