Added White Timeout
This commit is contained in:
parent
58f311d738
commit
5a34353a32
@ -8,6 +8,8 @@
|
|||||||
#define SOLID_COLOR_INDEX -2
|
#define SOLID_COLOR_INDEX -2
|
||||||
#define OFF_INDEX -1
|
#define OFF_INDEX -1
|
||||||
|
|
||||||
|
extern uint32_t whiteTimeout;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int AnimationIndex;
|
int AnimationIndex;
|
||||||
union {
|
union {
|
||||||
|
|||||||
@ -13,6 +13,8 @@
|
|||||||
#define FASTLED_CORE 0
|
#define FASTLED_CORE 0
|
||||||
static const char* tag = "strips";
|
static const char* tag = "strips";
|
||||||
|
|
||||||
|
uint32_t whiteTimeout = 0;
|
||||||
|
|
||||||
TaskHandle_t Animation_Task_Handle;
|
TaskHandle_t Animation_Task_Handle;
|
||||||
LEDSTRIP_SETTINGS ledSettings[2];
|
LEDSTRIP_SETTINGS ledSettings[2];
|
||||||
volatile bool AnimationLooping = false;
|
volatile bool AnimationLooping = false;
|
||||||
|
|||||||
10
src/main.cpp
10
src/main.cpp
@ -195,7 +195,6 @@ void setup()
|
|||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Button Scanning
|
// Button Scanning
|
||||||
ON_EVERY_N_MILLISECONDS(10)
|
ON_EVERY_N_MILLISECONDS(10)
|
||||||
{
|
{
|
||||||
@ -291,6 +290,15 @@ void loop()
|
|||||||
print_task_watermarks();
|
print_task_watermarks();
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
void setupLogLevels(esp_log_level_t logLevel)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user