Fix mini12864 v2.1 + PSU control + NeoPixel backlight (#21021)
This commit is contained in:
@ -994,7 +994,7 @@ void MarlinUI::update() {
|
||||
refresh(LCDVIEW_REDRAW_NOW);
|
||||
|
||||
#ifdef LED_BACKLIGHT_TIMEOUT
|
||||
leds.reset_timeout(ms);
|
||||
if (!powersupply_on) leds.reset_timeout(ms);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -121,11 +121,20 @@ void menu_led() {
|
||||
BACK_ITEM(MSG_MAIN);
|
||||
|
||||
#if ENABLED(LED_CONTROL_MENU)
|
||||
editable.state = leds.lights_on;
|
||||
EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
|
||||
#if ENABLED(PSU_CONTROL)
|
||||
extern bool powersupply_on;
|
||||
#else
|
||||
constexpr bool powersupply_on = true;
|
||||
#endif
|
||||
if (powersupply_on) {
|
||||
editable.state = leds.lights_on;
|
||||
EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
|
||||
}
|
||||
|
||||
#if ENABLED(LED_COLOR_PRESETS)
|
||||
ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds.set_default);
|
||||
#endif
|
||||
|
||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
||||
editable.state = leds2.lights_on;
|
||||
EDIT_ITEM(bool, MSG_LEDS2, &editable.state, leds2.toggle);
|
||||
|
Reference in New Issue
Block a user