Side-key functions added: key lock, switch VFOs
This commit is contained in:
36
app/common.c
Normal file
36
app/common.c
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "functions.h"
|
||||
#include "misc.h"
|
||||
#include "settings.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
void COMMON_KeypadLockToggle()
|
||||
{
|
||||
|
||||
if (gScreenToDisplay != DISPLAY_MENU &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // toggle the keyboad lock
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = gEeprom.KEY_LOCK ? VOICE_ID_UNLOCK : VOICE_ID_LOCK;
|
||||
#endif
|
||||
|
||||
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
|
||||
|
||||
gRequestSaveSettings = true;
|
||||
}
|
||||
}
|
||||
|
||||
void COMMON_SwitchVFOs()
|
||||
{
|
||||
gEeprom.TX_VFO ^= 1;
|
||||
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
gEeprom.CROSS_BAND_RX_TX = gEeprom.TX_VFO + 1;
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
||||
gEeprom.DUAL_WATCH = gEeprom.TX_VFO + 1;
|
||||
|
||||
gRequestSaveSettings = 1;
|
||||
gFlagReconfigureVfos = true;
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
}
|
Reference in New Issue
Block a user