From 4cb1d3a19a6738b1ddfb6ca39ab8da90564da617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ppler?= Date: Tue, 30 Mar 2021 23:02:39 +0200 Subject: [PATCH] Allow to switch LED breathing off --- ampel-firmware/co2_sensor.cpp | 5 ++++- ampel-firmware/config.public.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ampel-firmware/co2_sensor.cpp b/ampel-firmware/co2_sensor.cpp index 7110776..70eff69 100644 --- a/ampel-firmware/co2_sensor.cpp +++ b/ampel-firmware/co2_sensor.cpp @@ -13,6 +13,7 @@ namespace config { const float temperature_offset = -3.0; // [K] Temperature measured by sensor is usually at least 3K too high. #endif const bool auto_calibrate_sensor = AUTO_CALIBRATE_SENSOR; // [true / false] + const bool led_breathing = LED_BREATHING; } namespace sensor { @@ -137,7 +138,9 @@ namespace sensor { */ if (co2 < 2000) { led_effects::displayCO2color(co2); - led_effects::breathe(co2); + if (config::led_breathing) { + led_effects::breathe(co2); + } } else { // >= 2000: entire ring blinks red led_effects::redAlert(); diff --git a/ampel-firmware/config.public.h b/ampel-firmware/config.public.h index 0033935..6c09f44 100644 --- a/ampel-firmware/config.public.h +++ b/ampel-firmware/config.public.h @@ -64,6 +64,9 @@ # define MAX_BRIGHTNESS 255 # define MIN_BRIGHTNESS 60 +// Should the LED display show a breathing effect during measurement? +# define LED_BREATHING true // [true / false] + /** * WEB SERVER * available at http://local_ip, with user HTTP_USER and password HTTP_PASSWORD -- GitLab