mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-29 14:51:26 +03:00
Fixed PTT and key presses when backlight is off
This commit is contained in:
parent
45b5cbe315
commit
c23d21bcf1
@ -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 = (gBacklightCountdown > 0 || gEeprom.BACKLIGHT >= 5);
|
||||||
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||||
|
|
||||||
// if (Key == KEY_EXIT && bKeyPressed && !bKeyHeld && !backlight_was_on)
|
if (Key != KEY_PTT &&
|
||||||
if (bKeyPressed && !bKeyHeld && !backlight_was_on)
|
Key != KEY_F &&
|
||||||
|
bKeyPressed &&
|
||||||
|
!bKeyHeld &&
|
||||||
|
!backlight_was_on)
|
||||||
{ // just turn the light on for now
|
{ // just turn the light on for now
|
||||||
BACKLIGHT_TurnOn();
|
BACKLIGHT_TurnOn();
|
||||||
// gKeyReading0 = KEY_INVALID;
|
// gKeyReading0 = KEY_INVALID;
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user