Added White Timeout

This commit is contained in:
admin 2025-03-23 23:33:24 -07:00
parent 58f311d738
commit 5a34353a32
3 changed files with 59 additions and 47 deletions

View File

@ -8,6 +8,8 @@
#define SOLID_COLOR_INDEX -2
#define OFF_INDEX -1
extern uint32_t whiteTimeout;
typedef struct {
int AnimationIndex;
union {

View File

@ -13,6 +13,8 @@
#define FASTLED_CORE 0
static const char* tag = "strips";
uint32_t whiteTimeout = 0;
TaskHandle_t Animation_Task_Handle;
LEDSTRIP_SETTINGS ledSettings[2];
volatile bool AnimationLooping = false;

View File

@ -195,7 +195,6 @@ void setup()
void loop()
{
// Button Scanning
ON_EVERY_N_MILLISECONDS(10)
{
@ -291,6 +290,15 @@ void loop()
print_task_watermarks();
}
#endif
// Turn off white light after timeout
if(whiteTimeout > 0){
whiteTimeout--;
if(whiteTimeout == 0){
Lights_Set_White(0);
}
}
}
void setupLogLevels(esp_log_level_t logLevel)