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

Updated backlight menu options

This commit is contained in:
OneOfEleven
2023-09-24 19:52:14 +01:00
parent 1a626f83ae
commit 9cc84bd00b
8 changed files with 50 additions and 19 deletions

View File

@ -20,7 +20,7 @@
#include "settings.h"
// this is decremented once every 500ms
uint8_t gBacklightCountdown = 0;
uint16_t gBacklightCountdown = 0;
void BACKLIGHT_TurnOn(void)
{
@ -34,22 +34,27 @@ void BACKLIGHT_TurnOn(void)
{
default:
case 1: // 5 sec
gBacklightCountdown = 2 * 5;
gBacklightCountdown = 5;
break;
case 2: // 10 sec
gBacklightCountdown = 2 * 10;
gBacklightCountdown = 10;
break;
case 3: // 20 sec
gBacklightCountdown = 2 * 20;
gBacklightCountdown = 20;
break;
case 4: // 40 sec
gBacklightCountdown = 2 * 40;
case 4: // 1 min
gBacklightCountdown = 60;
break;
case 5: // 80 sec
gBacklightCountdown = 2 * 80;
case 5: // 2 min
gBacklightCountdown = 60 * 2;
break;
case 6: // always on
case 6: // 4 min
gBacklightCountdown = 60 * 4;
break;
case 7: // always on
gBacklightCountdown = 0;
break;
}
gBacklightCountdown *= 2;
}

View File

@ -19,7 +19,7 @@
#include <stdint.h>
extern uint8_t gBacklightCountdown;
extern uint16_t gBacklightCountdown;
void BACKLIGHT_TurnOn(void);