diff options
Diffstat (limited to 'control')
-rw-r--r-- | control/gui.c | 3 | ||||
-rw-r--r-- | control/ledctl.c | 6 | ||||
-rw-r--r-- | control/state.h | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/control/gui.c b/control/gui.c index e70ff87..1ca6142 100644 --- a/control/gui.c +++ b/control/gui.c @@ -19,6 +19,9 @@ void update_gui() { bc_module_lcd_draw_string(43, 2, "OFF", false); switch (mode) { + case MODE_SOLID_WARM: + bc_module_lcd_draw_string(40, 26, "warm", true); + break; case MODE_SOLID_RED: bc_module_lcd_draw_string(46, 26, "red", true); break; diff --git a/control/ledctl.c b/control/ledctl.c index 76bdc67..8a5bfea 100644 --- a/control/ledctl.c +++ b/control/ledctl.c @@ -5,6 +5,7 @@ const char *mode_string[] = { + [MODE_SOLID_WARM] = "#70200A", [MODE_SOLID_RED] = "#FF0000", [MODE_SOLID_GREEN] = "#00FF00", [MODE_SOLID_BLUE] = "#0000FF", @@ -34,6 +35,7 @@ void click_left() { switch (state) { case STATE_DEFAULT: enabled = 1; + update_mode(); // just to make sure that all is in sync update_brightness(); break; case STATE_BRIGHTNESS_SELECT: @@ -43,7 +45,7 @@ void click_left() { break; case STATE_COLOR_SELECT: if (mode >= MODE_RAINBOW) - mode = MODE_SOLID_RED; + mode = MODE_SOLID_WARM; else mode++; update_mode(); @@ -65,7 +67,7 @@ void click_right() { update_brightness(); break; case STATE_COLOR_SELECT: - if (mode <= MODE_SOLID_RED) + if (mode <= MODE_SOLID_WARM) mode = MODE_RAINBOW; else mode--; diff --git a/control/state.h b/control/state.h index 5f9525f..fab1e12 100644 --- a/control/state.h +++ b/control/state.h @@ -2,6 +2,7 @@ #define _STATE_H_ enum led_mode { + MODE_SOLID_WARM, MODE_SOLID_RED, MODE_SOLID_GREEN, MODE_SOLID_BLUE, |