Enable edit mode for dst callsign on mod17
This allows editing the destination callsign on the module17 When on the main screen, the right arrow will enter edit mode.
This commit is contained in:
parent
7c09f7d2b0
commit
6baa368984
|
|
@ -811,6 +811,23 @@ void ui_updateFSM(bool *sync_rtx)
|
|||
{
|
||||
// VFO screen
|
||||
case MAIN_VFO:
|
||||
if(ui_state.edit_mode)
|
||||
{
|
||||
if(msg.keys & KEY_ENTER)
|
||||
{
|
||||
_ui_textInputConfirm(ui_state.new_callsign);
|
||||
// Save selected callsign and disable input mode
|
||||
strncpy(state.m17_dest, ui_state.new_callsign, 10);
|
||||
*sync_rtx = true;
|
||||
ui_state.edit_mode = false;
|
||||
}
|
||||
else if(msg.keys & KEY_ESC)
|
||||
ui_state.edit_mode = false;
|
||||
else
|
||||
_ui_textInputArrows(ui_state.new_callsign, 9, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(msg.keys & KEY_ENTER)
|
||||
{
|
||||
// Save current main state
|
||||
|
|
@ -818,6 +835,11 @@ void ui_updateFSM(bool *sync_rtx)
|
|||
// Open Menu
|
||||
state.ui_screen = MENU_TOP;
|
||||
}
|
||||
else if (msg.keys & KEY_RIGHT)
|
||||
{
|
||||
ui_state.edit_mode = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// Top menu screen
|
||||
|
|
|
|||
Loading…
Reference in New Issue