kopia lustrzana https://github.com/OpenRTX/OpenRTX
UI: Save and restore VFO channel when switching to MEM mode
rodzic
d46772219d
commit
1a894c67df
|
@ -51,6 +51,7 @@ typedef struct
|
||||||
bool channelInfoUpdated;
|
bool channelInfoUpdated;
|
||||||
uint16_t channel_index;
|
uint16_t channel_index;
|
||||||
channel_t channel;
|
channel_t channel;
|
||||||
|
channel_t vfo_channel;
|
||||||
uint8_t rtxStatus;
|
uint8_t rtxStatus;
|
||||||
uint8_t sqlLevel;
|
uint8_t sqlLevel;
|
||||||
uint8_t voxLevel;
|
uint8_t voxLevel;
|
||||||
|
|
|
@ -440,6 +440,8 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
|
||||||
// Read successful and channel is valid
|
// Read successful and channel is valid
|
||||||
if(result != -1 && _ui_channel_valid(&channel))
|
if(result != -1 && _ui_channel_valid(&channel))
|
||||||
{
|
{
|
||||||
|
// Save VFO channel
|
||||||
|
state.vfo_channel = state.channel;
|
||||||
// Copy channel read to state
|
// Copy channel read to state
|
||||||
state.channel = channel;
|
state.channel = channel;
|
||||||
*sync_rtx = true;
|
*sync_rtx = true;
|
||||||
|
@ -509,6 +511,7 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
|
||||||
}
|
}
|
||||||
else if(msg.keys & KEY_ESC)
|
else if(msg.keys & KEY_ESC)
|
||||||
{
|
{
|
||||||
|
// Cancel frequency input, return to VFO mode
|
||||||
state.ui_screen = MAIN_VFO;
|
state.ui_screen = MAIN_VFO;
|
||||||
}
|
}
|
||||||
else if(msg.keys & KEY_UP || msg.keys & KEY_DOWN)
|
else if(msg.keys & KEY_UP || msg.keys & KEY_DOWN)
|
||||||
|
@ -582,6 +585,8 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
|
||||||
}
|
}
|
||||||
else if(msg.keys & KEY_ESC)
|
else if(msg.keys & KEY_ESC)
|
||||||
{
|
{
|
||||||
|
// Restore VFO channel
|
||||||
|
state.channel = state.vfo_channel;
|
||||||
// Switch to VFO screen
|
// Switch to VFO screen
|
||||||
state.ui_screen = MAIN_VFO;
|
state.ui_screen = MAIN_VFO;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue