0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +03:00

Fixed 200ms TX tail bug.

This commit is contained in:
OneOfEleven
2023-09-10 17:57:12 +01:00
parent 37afeb0414
commit 50a55e34ab
11 changed files with 112 additions and 80 deletions

View File

@ -19,19 +19,14 @@
#include "driver/gpio.h"
#include "settings.h"
uint8_t gBacklightCountdown;
uint8_t gBacklightCountdown = 0;
void BACKLIGHT_TurnOn(void)
{
if (gEeprom.BACKLIGHT > 0)
{
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
#if 0
gBacklightCountdown = 1 + (gEeprom.BACKLIGHT * 2);
#else
// much longer backlight times
gBacklightCountdown = (gEeprom.BACKLIGHT * 20) - 19;
#endif
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight ON
gBacklightCountdown = (gEeprom.BACKLIGHT < 5) ? (gEeprom.BACKLIGHT * 20) - 19 : 0; // much longer backlight times
}
}