Added White Timeout
This commit is contained in:
parent
58f311d738
commit
5a34353a32
@ -8,6 +8,8 @@
|
||||
#define SOLID_COLOR_INDEX -2
|
||||
#define OFF_INDEX -1
|
||||
|
||||
extern uint32_t whiteTimeout;
|
||||
|
||||
typedef struct {
|
||||
int AnimationIndex;
|
||||
union {
|
||||
|
||||
@ -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;
|
||||
|
||||
10
src/main.cpp
10
src/main.cpp
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user