mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-22 02:08:48 +00:00
Add "switch demodulation mode" function for programmable buttons
This commit is contained in:
parent
388c3dadf1
commit
8c9bdaacbc
11
app/action.c
11
app/action.c
@ -324,6 +324,14 @@ void ACTION_Scan(bool bRestart)
|
||||
}
|
||||
#endif
|
||||
|
||||
void ACTION_SwitchDemodul(void)
|
||||
{
|
||||
gTxVfo->Modulation++;
|
||||
if(gTxVfo->Modulation == MODULATION_UKNOWN)
|
||||
gTxVfo->Modulation = MODULATION_FM;
|
||||
gRequestSaveChannel = 1;
|
||||
}
|
||||
|
||||
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (gScreenToDisplay == DISPLAY_MAIN && gDTMF_InputMode) // entering DTMF code
|
||||
@ -439,5 +447,8 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
case ACTION_OPT_VFO_MR:
|
||||
COMMON_SwitchVFOMode();
|
||||
break;
|
||||
case ACTION_OPT_SWITCH_DEMODUL:
|
||||
ACTION_SwitchDemodul();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ void ACTION_Scan(bool bRestart);
|
||||
#ifdef ENABLE_FMRADIO
|
||||
void ACTION_FM(void);
|
||||
#endif
|
||||
void ACTION_SwitchDemodul(void);
|
||||
|
||||
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
||||
|
||||
|
@ -84,6 +84,7 @@ enum {
|
||||
ACTION_OPT_KEYLOCK,
|
||||
ACTION_OPT_A_B,
|
||||
ACTION_OPT_VFO_MR,
|
||||
ACTION_OPT_SWITCH_DEMODUL,
|
||||
ACTION_OPT_LEN
|
||||
};
|
||||
|
||||
|
@ -359,7 +359,8 @@ const t_sidefunction SIDEFUNCTIONS[] =
|
||||
#endif
|
||||
{"LOCK\nKEYPAD", ACTION_OPT_KEYLOCK},
|
||||
{"SWITCH\nVFO", ACTION_OPT_A_B},
|
||||
{"VFO/MR", ACTION_OPT_VFO_MR},
|
||||
{"VFO/MR", ACTION_OPT_VFO_MR},
|
||||
{"SWITCH\nDEMODUL", ACTION_OPT_SWITCH_DEMODUL},
|
||||
};
|
||||
const t_sidefunction* gSubMenu_SIDEFUNCTIONS = SIDEFUNCTIONS;
|
||||
const uint8_t gSubMenu_SIDEFUNCTIONS_size = ARRAY_SIZE(SIDEFUNCTIONS);
|
||||
|
Loading…
Reference in New Issue
Block a user