From 5311183c8a16f7ddf865ca00ed99518c18bb4311 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Tue, 26 Jan 2021 20:57:39 +0100 Subject: [PATCH] UI: Selecting a Channel in the Channel menu switches to MEM mode with that channel --- openrtx/src/ui/ui.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index 384fdbf1..00825cec 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -761,6 +761,18 @@ void ui_updateFSM(event_t event, bool *sync_rtx) ui_state.menu_selected += 1; } } + else if(msg.keys & KEY_ENTER) + { + if(state.ui_screen == MENU_CHANNEL) + { + // If we were in VFO mode, save VFO channel + if(ui_state.last_main_state == MAIN_VFO) + state.vfo_channel = state.channel; + _ui_fsm_loadChannel(ui_state.menu_selected, sync_rtx); + // Switch to MEM screen + state.ui_screen = MAIN_MEM; + } + } else if(msg.keys & KEY_ESC) { // Return to top menu