mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-04 01:01:25 +03:00
Added always ON backlight menu option
This commit is contained in:
parent
16434c8d14
commit
37afeb0414
@ -34,7 +34,7 @@ To enable the custom option just uncomment the line by removing the starting '#'
|
||||
* "TXP" menu, renamed to "TX-PWR"
|
||||
* "SAVE" menu, renamed to "B-SAVE"
|
||||
* "WX" menu, renamed to "CROS-B" - 'WX' normally means weather here in the UK
|
||||
* "ABR" menu, renamed to "BAK-LT", shows extended backlight times
|
||||
* "ABR" menu, renamed to "BAK-LT", shows extended backlight times, now has always ON option
|
||||
* "SCR" menu, renamed to "SCRAM"
|
||||
* "MIC" menu, shows mic gain in dB's, now includes the max mic gain possible (+15.5dB)
|
||||
* "VOL" menu, renamed to "BATVOL", shows voltage and percentage
|
||||
|
@ -1301,7 +1301,8 @@ void APP_TimeSlice500ms(void)
|
||||
{
|
||||
if (gBacklightCountdown)
|
||||
if (--gBacklightCountdown == 0)
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
|
||||
if (gEeprom.BACKLIGHT < 5)
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
|
||||
|
||||
#ifndef DISABLE_AIRCOPY
|
||||
if (gScreenToDisplay != DISPLAY_AIRCOPY && (gScreenToDisplay != DISPLAY_SCANNER || gScanCssState >= SCAN_CSS_STATE_FOUND))
|
||||
@ -1397,7 +1398,8 @@ void APP_TimeSlice500ms(void)
|
||||
gReducedService = true;
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
ST7565_Configure_GPIO_B11();
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
//if (gEeprom.BACKLIGHT < 5)
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
}
|
||||
#ifndef DISABLE_VOICE
|
||||
else
|
||||
|
@ -23,7 +23,7 @@ uint8_t gBacklightCountdown;
|
||||
|
||||
void BACKLIGHT_TurnOn(void)
|
||||
{
|
||||
if (gEeprom.BACKLIGHT)
|
||||
if (gEeprom.BACKLIGHT > 0)
|
||||
{
|
||||
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
#if 0
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
3
main.c
3
main.c
@ -110,7 +110,8 @@ void Main(void)
|
||||
if (!gChargingWithTypeC && !gBatteryDisplayLevel)
|
||||
{
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
//if (gEeprom.BACKLIGHT < 5)
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
gReducedService = true;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user