Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/components/RGBLed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ namespace pins {
}

namespace device {
const String VERSION = "v1.2.0-rc1";
const String VERSION = "v1.2.0-rc5";
}
2 changes: 1 addition & 1 deletion src/src.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void setup() {
digitalWrite(LED_BUILTIN, LOW);

rgb.startFromStorage();
rgb.run();
// rgb.run();

// TODO: activate Serial with env
Serial.begin(115200);
Expand Down