Add rescueops new feature
This commit is contained in:
@@ -1398,7 +1398,7 @@ void APP_TimeSlice10ms(void)
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
#if !defined(ENABLE_FEAT_F4HWN) || defined(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||
#ifdef ENABLE_FLASHLIGHT
|
||||
FlashlightTimeSlice();
|
||||
#endif
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "flashlight.h"
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
#if !defined(ENABLE_FEAT_F4HWN) || defined(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||
enum FlashlightMode_t gFlashLightState;
|
||||
|
||||
void FlashlightTimeSlice()
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
#if !defined(ENABLE_FEAT_F4HWN) || defined(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||
enum FlashlightMode_t {
|
||||
FLASHLIGHT_OFF = 0,
|
||||
FLASHLIGHT_ON,
|
||||
|
29
app/main.c
29
app/main.c
@@ -84,6 +84,12 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
{
|
||||
uint8_t Vfo = gEeprom.TX_VFO;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||
if(gEeprom.MENU_LOCK == true) {
|
||||
return; // prevent F function if MENU LOCK is true
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gScreenToDisplay == DISPLAY_MENU) {
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
return;
|
||||
@@ -680,11 +686,19 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||
if(gEeprom.MENU_LOCK == false) {
|
||||
#endif
|
||||
|
||||
gFlagRefreshSetting = true;
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = VOICE_ID_MENU;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
@@ -694,6 +708,13 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||
if(gEeprom.MENU_LOCK == true) {
|
||||
return; // prevent F function if MENU LOCK is true
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
return;
|
||||
|
||||
@@ -927,7 +948,13 @@ void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
MAIN_Key_STAR(bKeyPressed, bKeyHeld);
|
||||
break;
|
||||
case KEY_F:
|
||||
GENERIC_Key_F(bKeyPressed, bKeyHeld);
|
||||
#ifndef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||
GENERIC_Key_F(bKeyPressed, bKeyHeld);
|
||||
#else
|
||||
if(gEeprom.MENU_LOCK == false) {
|
||||
GENERIC_Key_F(bKeyPressed, bKeyHeld);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case KEY_PTT:
|
||||
GENERIC_Key_PTT(bKeyPressed);
|
||||
|
Reference in New Issue
Block a user