0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

Fixed PTT and key presses when backlight is off

This commit is contained in:
OneOfEleven 2023-09-18 12:29:20 +01:00
parent 45b5cbe315
commit c23d21bcf1
4 changed files with 5 additions and 2 deletions

View File

@ -1847,8 +1847,11 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
// const bool backlight_was_on = (gBacklightCountdown > 0 || gEeprom.BACKLIGHT >= 5);
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
// if (Key == KEY_EXIT && bKeyPressed && !bKeyHeld && !backlight_was_on)
if (bKeyPressed && !bKeyHeld && !backlight_was_on)
if (Key != KEY_PTT &&
Key != KEY_F &&
bKeyPressed &&
!bKeyHeld &&
!backlight_was_on)
{ // just turn the light on for now
BACKLIGHT_TurnOn();
// gKeyReading0 = KEY_INVALID;

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.