Use first LED for Calibration Status

This commit is contained in:
seiichiro 2021-05-14 14:12:54 +02:00
parent 6cecabf2ac
commit 9f9141c5f0

View file

@ -405,17 +405,13 @@ void loop()
// Press Button longer than 4 Seconds -> Start Sensor Calibration Routine (if applicable) // Press Button longer than 4 Seconds -> Start Sensor Calibration Routine (if applicable)
unsigned long loop_millis = millis(); unsigned long loop_millis = millis();
if ((unsigned long)(loop_millis - btn_millis) >= 4000) { if ((unsigned long)(loop_millis - btn_millis) >= 4000) {
#if WS2812B_NUM > 1 WS2812B_SETLED(0,153,0,153);
WS2812B_SETLED(1,153,0,153);
#endif
BLINK_LED(3); BLINK_LED(3);
delay(1000); delay(1000);
for (uint8_t i=0; i<NUM_SENSORS; i++) for (uint8_t i=0; i<NUM_SENSORS; i++)
sensors[i]->calibrate(); sensors[i]->calibrate();
BLINK_LED(1); BLINK_LED(1);
#if WS2812B_NUM > 1 WS2812B_SETLED(0,0,0,0);
WS2812B_SETLED(1,0,0,0);
#endif
} else { } else {
delay(500); delay(500);
} }