Skip to content

Commit 55e5a38

Browse files
Add CO2 level check to LED control logic
1 parent fb0c0a1 commit 55e5a38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OpenCO2_Sensor.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ void getColor(uint16_t co2, int* red, int* green, int* blue) {
421421
void setLED(uint16_t co2) {
422422
updateBatteryMode();
423423
if ((BatteryMode && !LEDonBattery)
424-
|| (!BatteryMode && !LEDonUSB)) {
424+
|| (!BatteryMode && !LEDonUSB)
425+
|| (co2 < 1000)) {
425426
if (HWSubRev == 3) digitalWrite(LED_POWER, LOW); // LED OFF
426427
else digitalWrite(LED_POWER, HIGH); // LED OFF
427428
leds[0] = CRGB (0, 0, 0);

0 commit comments

Comments
 (0)