added LightState Switch

This commit is contained in:
2024-05-20 17:44:56 +02:00
parent e995e1bd01
commit 25fb6d0a1e
8 changed files with 100 additions and 16 deletions

View File

@@ -35,6 +35,14 @@ static volatile struct LightSettings_s {
volatile uint8_t theme;
} lightSettings;
void LightTask_setBrightness(uint8_t brightness) {
lightSettings.brightness = brightness;
}
void LightTask_setTheme(uint8_t theme) {
lightSettings.theme = theme;
}
// these are used to save these settings some tome after they change
static const uint32_t settingSaveTimeout = 10*1000;
static volatile uint32_t settingChangeTime = 0;