Revert BackLight Action and add 2 new buttons shortcuts
This commit is contained in:
@@ -65,6 +65,16 @@ void BACKLIGHT_TurnOn(void)
|
||||
#endif
|
||||
|
||||
if (gEeprom.BACKLIGHT_TIME == 0) {
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gK5startup == true) {
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
}
|
||||
}
|
||||
gK5startup = false;
|
||||
#endif
|
||||
BACKLIGHT_TurnOff();
|
||||
return;
|
||||
}
|
||||
@@ -72,9 +82,7 @@ void BACKLIGHT_TurnOn(void)
|
||||
backlightOn = true;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
static bool k5Startup = true;
|
||||
|
||||
if(k5Startup == true) {
|
||||
if(gK5startup == true) {
|
||||
for(uint8_t i = 0; i <= gEeprom.BACKLIGHT_MAX; i++)
|
||||
{
|
||||
BACKLIGHT_SetBrightness(i);
|
||||
@@ -87,7 +95,7 @@ void BACKLIGHT_TurnOn(void)
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
}
|
||||
|
||||
k5Startup = false;
|
||||
gK5startup = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
1
misc.c
1
misc.c
@@ -276,6 +276,7 @@ uint8_t gIsLocked = 0xFF;
|
||||
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
bool gK5startup = true;
|
||||
bool gBackLight = false;
|
||||
uint8_t gBacklightTimeOriginal;
|
||||
uint8_t gBacklightBrightnessOld;
|
||||
|
2
misc.h
2
misc.h
@@ -343,10 +343,10 @@ extern uint8_t gIsLocked;
|
||||
extern volatile uint8_t boot_counter_10ms;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
extern bool gK5startup;
|
||||
extern bool gBackLight;
|
||||
extern uint8_t gBacklightTimeOriginal;
|
||||
extern uint8_t gBacklightBrightnessOld;
|
||||
|
||||
extern uint8_t gPttOnePushCounter;
|
||||
extern uint32_t gBlinkCounter;
|
||||
#endif
|
||||
|
15
settings.c
15
settings.c
@@ -528,7 +528,20 @@ void SETTINGS_SaveSettings(void)
|
||||
State[2] = gEeprom.CROSS_BAND_RX_TX;
|
||||
State[3] = gEeprom.BATTERY_SAVE;
|
||||
State[4] = gEeprom.DUAL_WATCH;
|
||||
State[5] = gEeprom.BACKLIGHT_TIME;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gBackLight)
|
||||
{
|
||||
State[5] = gBacklightTimeOriginal;
|
||||
}
|
||||
else
|
||||
{
|
||||
State[5] = gEeprom.BACKLIGHT_TIME;
|
||||
}
|
||||
#else
|
||||
State[5] = gEeprom.BACKLIGHT_TIME;
|
||||
#endif
|
||||
|
||||
State[6] = gEeprom.TAIL_TONE_ELIMINATION;
|
||||
State[7] = gEeprom.VFO_OPEN;
|
||||
EEPROM_WriteBuffer(0x0E78, State);
|
||||
|
Reference in New Issue
Block a user