diff --git a/src/components/RGBLed.hpp b/src/components/RGBLed.hpp index 0f64790..eb6b7d9 100644 --- a/src/components/RGBLed.hpp +++ b/src/components/RGBLed.hpp @@ -92,9 +92,18 @@ class RGBLed { uint8_t b = this->settings.getRgbBlue(); this->color = { r, g, b }; + if (this->shouldTurnOn()) + this->turnOnAnimated(); + else + this->turnOffAnimated(); + this->updateLedDisplayValues(); } + bool shouldTurnOn() { + return !isOn && this->targetBrightness != 0; + } + void run() { this->red.run(); this->green.run(); diff --git a/src/config.h b/src/config.h index afade03..2155ab0 100644 --- a/src/config.h +++ b/src/config.h @@ -21,5 +21,5 @@ namespace pins { } namespace device { - const String VERSION = "v1.2.0-rc1"; + const String VERSION = "v1.2.0-rc5"; } diff --git a/src/src.ino b/src/src.ino index f0f8c46..196abca 100644 --- a/src/src.ino +++ b/src/src.ino @@ -37,7 +37,7 @@ void setup() { digitalWrite(LED_BUILTIN, LOW); rgb.startFromStorage(); - rgb.run(); + // rgb.run(); // TODO: activate Serial with env Serial.begin(115200);