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

@ -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)
{