|
|
@ -26,13 +26,14 @@ |
|
|
|
|
|
|
|
#include "../../inc/MarlinConfigPre.h" |
|
|
|
|
|
|
|
#if BOTH(HAS_LCD_MENU, LED_CONTROL_MENU) |
|
|
|
#if HAS_LCD_MENU && EITHER(LED_CONTROL_MENU, CASE_LIGHT_MENU) |
|
|
|
|
|
|
|
#include "menu.h" |
|
|
|
|
|
|
|
#if ENABLED(LED_CONTROL_MENU) |
|
|
|
#include "../../feature/leds/leds.h" |
|
|
|
|
|
|
|
#if ENABLED(LED_COLOR_PRESETS) |
|
|
|
|
|
|
|
void menu_led_presets() { |
|
|
|
START_MENU(); |
|
|
|
#if LCD_HEIGHT > 2 |
|
|
@ -66,10 +67,28 @@ void menu_led_custom() { |
|
|
|
#endif |
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(CASE_LIGHT_MENU) |
|
|
|
#include "../../feature/caselight.h" |
|
|
|
|
|
|
|
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) |
|
|
|
void menu_case_light() { |
|
|
|
START_MENU(); |
|
|
|
BACK_ITEM(MSG_CONFIGURATION); |
|
|
|
EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &case_light_brightness, 0, 255, update_case_light, true); |
|
|
|
EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); |
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void menu_led() { |
|
|
|
START_MENU(); |
|
|
|
BACK_ITEM(MSG_MAIN); |
|
|
|
#if ENABLED(LED_CONTROL_MENU) |
|
|
|
bool led_on = leds.lights_on; |
|
|
|
EDIT_ITEM(bool, MSG_LEDS, &led_on, leds.toggle); |
|
|
|
ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds.set_default); |
|
|
@ -77,6 +96,18 @@ void menu_led() { |
|
|
|
SUBMENU(MSG_LED_PRESETS, menu_led_presets); |
|
|
|
#endif |
|
|
|
SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom); |
|
|
|
#endif |
|
|
|
//
|
|
|
|
// Set Case light on/off/brightness
|
|
|
|
//
|
|
|
|
#if ENABLED(CASE_LIGHT_MENU) |
|
|
|
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) |
|
|
|
if (TERN1(CASE_LIGHT_USE_NEOPIXEL, PWM_PIN(CASE_LIGHT_PIN))) |
|
|
|
SUBMENU(MSG_CASE_LIGHT, menu_case_light); |
|
|
|
else |
|
|
|
#endif |
|
|
|
EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); |
|
|
|
#endif |
|
|
|
END_MENU(); |
|
|
|
} |
|
|
|
|
|
|
|