Commit c3d8c797 authored by Eric Duminil's avatar Eric Duminil
Browse files

Allow to set color

parent 8ca175d2
......@@ -70,11 +70,19 @@ namespace led_effects {
onBoardLEDOff();
}
void showColor(int32_t color) {
config::night_mode = true; // In order to avoid overwriting the desired color next time CO2 is displayed
pixels.setBrightness(255);
pixels.fill(color);
pixels.show();
}
void setupRing() {
pixels.begin();
pixels.setBrightness(config::max_brightness);
LEDsOff();
sensor_console::defineCommand("night_mode", toggleNightMode, F(" (Toggles night mode on/off)"));
sensor_console::defineIntCommand("color", showColor, F(" 0xFF0015 (Shows color, specified as RGB, for debugging)"));
}
void toggleNightMode() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment