File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,13 @@ typedef struct LEDColor {
107107
108108class LEDLights {
109109public:
110+ #if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED)
111+ static LEDColor color; // last non-off color
112+ static bool lights_on; // the last set color was "on"
113+ #else
114+ static constexpr bool lights_on = true ;
115+ #endif
116+
110117 LEDLights () {} // ctor
111118
112119 static void setup (); // init()
@@ -142,15 +149,10 @@ class LEDLights {
142149 static LEDColor get_color () { return lights_on ? color : LEDColorOff (); }
143150 #endif
144151
145- #if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED)
146- static LEDColor color; // last non-off color
147- static bool lights_on; // the last set color was "on"
148- #endif
149-
150152 #if ENABLED(LED_CONTROL_MENU)
151153 static void toggle (); // swap "off" with color
152154 #endif
153- #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED)
155+ #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) || LED_POWEROFF_TIMEOUT > 0
154156 static void update () { set_color (color); }
155157 #endif
156158
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_P
3232 SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
3333 BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
3434 FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
35- PSU_CONTROL PS_OFF_CONFIRM PS_OFF_SOUND POWER_OFF_WAIT_FOR_COOLDOWN \
35+ PSU_CONTROL LED_POWEROFF_TIMEOUT PS_OFF_CONFIRM PS_OFF_SOUND POWER_OFF_WAIT_FOR_COOLDOWN \
3636 POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE POWER_LOSS_RECOVER_ZHOME POWER_LOSS_ZHOME_POS \
3737 SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE ADVANCE_K_EXTRA \
3838 HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
You can’t perform that action at this time.
0 commit comments