0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 14:48:03 +03:00

Menu timeout to 30 seconds

This commit is contained in:
OneOfEleven
2023-09-11 11:56:59 +01:00
parent cff04127d3
commit 6a1b7d8673
7 changed files with 23 additions and 19 deletions

View File

@ -19,6 +19,7 @@
#include "driver/gpio.h"
#include "settings.h"
// this is decremented once every 500ms
uint8_t gBacklightCountdown = 0;
void BACKLIGHT_TurnOn(void)
@ -33,16 +34,16 @@ void BACKLIGHT_TurnOn(void)
{
default:
case 1: // 10 sec
gBacklightCountdown = 2 * 10; // 1
gBacklightCountdown = 2 * 10;
break;
case 2: // 20 sec
gBacklightCountdown = 2 * 20; // 21
gBacklightCountdown = 2 * 20;
break;
case 3: // 40 sec
gBacklightCountdown = 2 * 40; // 61
gBacklightCountdown = 2 * 40;
break;
case 4: // 80 sec
gBacklightCountdown = 2 * 80; // 141
gBacklightCountdown = 2 * 80;
break;
case 5: // always on
gBacklightCountdown = 0;