mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-22 17:52:57 +00:00
🚸 Move solo Case Light menu up
This commit is contained in:
parent
deb076b9cd
commit
21a604407d
2 changed files with 30 additions and 21 deletions
|
@ -111,24 +111,24 @@
|
||||||
#if ENABLED(CASE_LIGHT_MENU)
|
#if ENABLED(CASE_LIGHT_MENU)
|
||||||
#include "../../feature/caselight.h"
|
#include "../../feature/caselight.h"
|
||||||
|
|
||||||
#define CASELIGHT_TOGGLE_ITEM() EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&caselight.on, caselight.update_enabled)
|
|
||||||
|
|
||||||
#if CASELIGHT_USES_BRIGHTNESS
|
#if CASELIGHT_USES_BRIGHTNESS
|
||||||
void menu_case_light() {
|
void menu_case_light() {
|
||||||
START_MENU();
|
START_MENU();
|
||||||
BACK_ITEM(MSG_CONFIGURATION);
|
BACK_ITEM(MSG_CONFIGURATION);
|
||||||
EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true);
|
EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true);
|
||||||
CASELIGHT_TOGGLE_ITEM();
|
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void menu_led() {
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
START_MENU();
|
|
||||||
BACK_ITEM(MSG_MAIN_MENU);
|
void menu_led() {
|
||||||
|
START_MENU();
|
||||||
|
BACK_ITEM(MSG_MAIN_MENU);
|
||||||
|
|
||||||
#if ENABLED(LED_CONTROL_MENU)
|
|
||||||
if (TERN1(PSU_CONTROL, powerManager.psu_on)) {
|
if (TERN1(PSU_CONTROL, powerManager.psu_on)) {
|
||||||
editable.state = leds.lights_on;
|
editable.state = leds.lights_on;
|
||||||
EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
|
EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
|
||||||
|
@ -152,21 +152,22 @@ void menu_led() {
|
||||||
SUBMENU(MSG_NEO2_PRESETS, menu_leds2_presets);
|
SUBMENU(MSG_NEO2_PRESETS, menu_leds2_presets);
|
||||||
#endif
|
#endif
|
||||||
SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom);
|
SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom);
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set Case light on/off/brightness
|
// Set Case light on/off/brightness
|
||||||
//
|
//
|
||||||
#if ENABLED(CASE_LIGHT_MENU)
|
#if ENABLED(CASE_LIGHT_MENU)
|
||||||
#if CASELIGHT_USES_BRIGHTNESS
|
#if CASELIGHT_USES_BRIGHTNESS
|
||||||
if (caselight.has_brightness())
|
if (caselight.has_brightness())
|
||||||
SUBMENU(MSG_CASE_LIGHT, menu_case_light);
|
SUBMENU(MSG_CASE_LIGHT, menu_case_light);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
|
||||||
#endif
|
#endif
|
||||||
CASELIGHT_TOGGLE_ITEM();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // LED_CONTROL_MENU
|
||||||
|
|
||||||
#endif // HAS_MARLINUI_MENU && LED_CONTROL_MENU
|
#endif // HAS_MARLINUI_MENU && LED_CONTROL_MENU
|
||||||
|
|
|
@ -88,8 +88,12 @@ void menu_configuration();
|
||||||
void menu_info();
|
void menu_info();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU)
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
void menu_led();
|
void menu_led();
|
||||||
|
#elif ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
|
||||||
|
void menu_case_light();
|
||||||
|
#elif ENABLED(CASE_LIGHT_MENU)
|
||||||
|
#include "../../feature/caselight.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_CUTTER
|
#if HAS_CUTTER
|
||||||
|
@ -371,8 +375,12 @@ void menu_main() {
|
||||||
SUBMENU(MSG_INFO_MENU, menu_info);
|
SUBMENU(MSG_INFO_MENU, menu_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU)
|
#if ENABLED(LED_CONTROL_MENU)
|
||||||
SUBMENU(MSG_LEDS, menu_led);
|
SUBMENU(MSG_LEDS, menu_led);
|
||||||
|
#elif ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
|
||||||
|
SUBMENU(MSG_CASE_LIGHT, menu_case_light);
|
||||||
|
#elif ENABLED(CASE_LIGHT_MENU)
|
||||||
|
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue