Skip to content

Commit 6f21d2e

Browse files
committed
Add CO2 level check to LED control logic
1 parent fb0c0a1 commit 6f21d2e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

OpenCO2_Sensor.ino

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

epd_abstraction.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,8 @@ void displayWriteMeasuerments(uint16_t co2, float temperature, float humidity) {
441441
/* humidity */
442442
Paint_DrawNum(124, 5, humidity, &mid, BLACK, WHITE);
443443
Paint_DrawString_EN(184, 5, "%", &bahn_sml, WHITE, BLACK);
444+
445+
Paint_DrawNum(50, 180, (int32_t)ESP.getCpuFreqMHz(), &Font16, BLACK, WHITE);
444446
#endif /* EINK_1IN54V2 */
445447

446448
#ifdef EINK_4IN2

0 commit comments

Comments
 (0)