1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

🚸 LED menu tweaks

This commit is contained in:
Scott Lahteine 2024-10-13 23:54:03 -05:00
parent 81760d6818
commit d6c3f45bda
25 changed files with 94 additions and 68 deletions

View File

@ -3358,7 +3358,7 @@ void drawFilSetMenu() {
if (SET_MENU(ledControlMenu, MSG_LED_CONTROL, 10)) {
BACK_ITEM((currentMenu == tuneMenu) ? drawTuneMenu : drawControlMenu);
#if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, setLedStatus, &leds.lights_on);
EDIT_ITEM(ICON_LedControl, MSG_LIGHTS, onDrawChkbMenu, setLedStatus, &leds.lights_on);
#endif
#if HAS_COLOR_LEDS
#if ENABLED(LED_COLOR_PRESETS)
@ -3450,7 +3450,7 @@ void drawTuneMenu() {
MENU_ITEM(ICON_LedControl, MSG_LED_CONTROL, onDrawSubMenu, drawLedControlMenu);
#endif
#elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL)
EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, setLedStatus, &leds.lights_on);
EDIT_ITEM(ICON_LedControl, MSG_LIGHTS, onDrawChkbMenu, setLedStatus, &leds.lights_on);
#endif
}
updateMenu(tuneMenu);

View File

@ -31,7 +31,7 @@ using namespace Theme;
void CaseLightScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.heading( GET_TEXT_F(MSG_CASE_LIGHT));
w.toggle( 2, GET_TEXT_F(MSG_LEDS), getCaseLightState());
w.toggle( 2, GET_TEXT_F(MSG_LIGHTS), getCaseLightState());
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
w.precision(0).units(GET_TEXT_F(MSG_UNITS_PERCENT))
.adjuster(10, GET_TEXT_F(MSG_CASE_LIGHT_BRIGHTNESS), getCaseLightBrightness_percent());

View File

@ -200,7 +200,8 @@ namespace LanguageNarrow_cz {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Uložit síť bodů");
LSTR MSG_LED_CONTROL = _UxGT("Nastavení LED");
LSTR MSG_LEDS = _UxGT("Světla");
LSTR MSG_LIGHTS = _UxGT("Světla");
LSTR MSG_LIGHT_N = _UxGT("Světla #{");
LSTR MSG_LED_PRESETS = _UxGT("Světla Předvolby");
LSTR MSG_SET_LEDS_RED = _UxGT("Červená");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Oranžová");

View File

@ -254,7 +254,8 @@ namespace LanguageNarrow_de {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Bettnetz speichern");
LSTR MSG_LED_CONTROL = _UxGT("Licht-Steuerung");
LSTR MSG_LEDS = _UxGT("Licht");
LSTR MSG_LIGHTS = _UxGT("Licht");
LSTR MSG_LIGHT_N = _UxGT("Lichter #{");
LSTR MSG_LED_PRESETS = _UxGT("Licht-Einstellung");
LSTR MSG_SET_LEDS_RED = _UxGT("Rot");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange");
@ -266,7 +267,6 @@ namespace LanguageNarrow_de {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Weiß");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard");
LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {");
LSTR MSG_LEDS2 = _UxGT("Lichter #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Licht #2 Voreinst.");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Helligkeit");
LSTR MSG_CUSTOM_LEDS = _UxGT("Benutzerdefiniert");

View File

@ -310,7 +310,8 @@ namespace LanguageNarrow_en {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh");
LSTR MSG_LED_CONTROL = _UxGT("LED Control");
LSTR MSG_LEDS = _UxGT("Lights");
LSTR MSG_LIGHTS = _UxGT("Lights");
LSTR MSG_LIGHT_N = _UxGT("Light #{");
LSTR MSG_LED_PRESETS = _UxGT("Light Presets");
LSTR MSG_SET_LEDS_RED = _UxGT("Red");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange");
@ -322,7 +323,6 @@ namespace LanguageNarrow_en {
LSTR MSG_SET_LEDS_WHITE = _UxGT("White");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Default");
LSTR MSG_LED_CHANNEL_N = _UxGT("Channel {");
LSTR MSG_LEDS2 = _UxGT("Lights #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Light #2 Presets");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Brightness");
LSTR MSG_CUSTOM_LEDS = _UxGT("Custom Lights");
@ -331,6 +331,8 @@ namespace LanguageNarrow_en {
LSTR MSG_INTENSITY_B = _UxGT("Blue Intensity");
LSTR MSG_INTENSITY_W = _UxGT("White Intensity");
LSTR MSG_LED_BRIGHTNESS = _UxGT("Brightness");
LSTR MSG_LIGHT_ENCODER = _UxGT("Encoder Light");
LSTR MSG_LIGHT_ENCODER_PRESETS = _UxGT("Encoder Light Presets");
LSTR MSG_MOVING = _UxGT("Moving...");
LSTR MSG_FREE_XY = _UxGT("Free XY");

View File

@ -198,7 +198,8 @@ namespace LanguageNarrow_es {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Guardar Mall. cama");
LSTR MSG_LED_CONTROL = _UxGT("Control LED");
LSTR MSG_LEDS = _UxGT("LEDS");
LSTR MSG_LIGHTS = _UxGT("Luces");
LSTR MSG_LIGHT_N = _UxGT("Luce #{");
LSTR MSG_LED_PRESETS = _UxGT("Color predefinido");
LSTR MSG_SET_LEDS_RED = _UxGT("Rojo");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Naranja");

View File

@ -108,7 +108,8 @@ namespace LanguageNarrow_eu {
LSTR MSG_UBL_MESH_LEVEL = _UxGT("Sarea berdindu");
LSTR MSG_UBL_MAP_TYPE = _UxGT("Mapa mota");
LSTR MSG_LED_CONTROL = _UxGT("LED ezarpenak");
LSTR MSG_LEDS = _UxGT("Argiak");
LSTR MSG_LIGHTS = _UxGT("Argiak");
LSTR MSG_LIGHT_N = _UxGT("Argi #{");
LSTR MSG_LED_PRESETS = _UxGT("Argi aurrehautaketak");
LSTR MSG_SET_LEDS_RED = _UxGT("Gorria");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Laranja");

View File

@ -202,7 +202,8 @@ namespace LanguageNarrow_fr {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Stocker grille");
LSTR MSG_LED_CONTROL = _UxGT("Contrôle LED");
LSTR MSG_LEDS = _UxGT("Lumière");
LSTR MSG_LIGHTS = _UxGT("Lumière");
LSTR MSG_LIGHT_N = _UxGT("Lumière #{");
LSTR MSG_LED_PRESETS = _UxGT("Préregl. LED");
LSTR MSG_SET_LEDS_RED = _UxGT("Rouge");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange");

View File

@ -202,7 +202,8 @@ namespace LanguageNarrow_fr_na {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Stocker grille");
LSTR MSG_LED_CONTROL = _UxGT("Controle LED");
LSTR MSG_LEDS = _UxGT("Lumiere");
LSTR MSG_LIGHTS = _UxGT("Lumiere");
LSTR MSG_LIGHT_N = _UxGT("Lumiere #{");
LSTR MSG_LED_PRESETS = _UxGT("Preregl. LED");
LSTR MSG_SET_LEDS_RED = _UxGT("Rouge");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange");

View File

@ -195,7 +195,8 @@ namespace LanguageNarrow_gl {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Gardar Malla Cama");
LSTR MSG_LED_CONTROL = _UxGT("Control LED");
LSTR MSG_LEDS = _UxGT("Luces");
LSTR MSG_LIGHTS = _UxGT("Luces");
LSTR MSG_LIGHT_N = _UxGT("Luce #{");
LSTR MSG_LED_PRESETS = _UxGT("Axustes Luz");
LSTR MSG_SET_LEDS_RED = _UxGT("Vermello");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Laranxa");

View File

@ -226,7 +226,8 @@ namespace LanguageNarrow_hu {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Ágy háló mentése");
LSTR MSG_LED_CONTROL = _UxGT("LED vezérlés");
LSTR MSG_LEDS = _UxGT("Világítás");
LSTR MSG_LIGHTS = _UxGT("Világítás");
LSTR MSG_LIGHT_N = _UxGT("Világítás #{");
LSTR MSG_LED_PRESETS = _UxGT("Beállított színek");
LSTR MSG_SET_LEDS_RED = _UxGT("Piros");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Narancs");
@ -238,7 +239,6 @@ namespace LanguageNarrow_hu {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Fehér");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték");
LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna {");
LSTR MSG_LEDS2 = _UxGT("LED-ek #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Fény #2 megadott");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Fényerö");
LSTR MSG_CUSTOM_LEDS = _UxGT("Egyéni szín");

View File

@ -275,7 +275,8 @@ namespace LanguageNarrow_it {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salva mesh piatto");
LSTR MSG_LED_CONTROL = _UxGT("Controllo LED");
LSTR MSG_LEDS = _UxGT("Luci");
LSTR MSG_LIGHTS = _UxGT("Luci");
LSTR MSG_LIGHT_N = _UxGT("Luce #{");
LSTR MSG_LED_PRESETS = _UxGT("Presets luce");
LSTR MSG_SET_LEDS_RED = _UxGT("Rosso");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Arancione");
@ -287,7 +288,6 @@ namespace LanguageNarrow_it {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Bianco");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito");
LSTR MSG_LED_CHANNEL_N = _UxGT("Canale {");
LSTR MSG_LEDS2 = _UxGT("Luci #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Presets luce #2");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità");
LSTR MSG_CUSTOM_LEDS = _UxGT("Luci personalizzate");

View File

@ -208,7 +208,8 @@ namespace LanguageNarrow_pl {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Zapis siatki stołu");
LSTR MSG_LED_CONTROL = _UxGT("Sterowanie LED");
LSTR MSG_LEDS = _UxGT("Światła");
LSTR MSG_LIGHTS = _UxGT("Światła");
LSTR MSG_LIGHT_N = _UxGT("Światło #{");
LSTR MSG_LED_PRESETS = _UxGT("Ustawienia świateł");
LSTR MSG_SET_LEDS_RED = _UxGT("Czerwony");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Pomarańczowy");

View File

@ -180,7 +180,8 @@ namespace LanguageNarrow_pt_br {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salvar Malha");
LSTR MSG_LED_CONTROL = _UxGT("Controle do LED");
LSTR MSG_LEDS = _UxGT("Luz");
LSTR MSG_LIGHTS = _UxGT("Luz");
LSTR MSG_LIGHT_N = _UxGT("Luz #{");
LSTR MSG_LED_PRESETS = _UxGT("Configuração da Luz");
LSTR MSG_SET_LEDS_RED = _UxGT("Luz Vermelha");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Luz Laranja");

View File

@ -194,7 +194,8 @@ namespace LanguageNarrow_ro {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh");
LSTR MSG_LED_CONTROL = _UxGT("LED Control");
LSTR MSG_LEDS = _UxGT("Lights");
LSTR MSG_LIGHTS = _UxGT("Lights");
LSTR MSG_LIGHT_N = _UxGT("Light #{");
LSTR MSG_LED_PRESETS = _UxGT("Light Presets");
LSTR MSG_SET_LEDS_RED = _UxGT("Red");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange");

View File

@ -226,7 +226,8 @@ namespace LanguageNarrow_ru {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Сохранить сетку");
LSTR MSG_LED_CONTROL = _UxGT("Настройка подсветки");
LSTR MSG_LEDS = _UxGT("Подсветка");
LSTR MSG_LIGHTS = _UxGT("Подсветка");
LSTR MSG_LIGHT_N = _UxGT("Свет #{");
LSTR MSG_LED_PRESETS = _UxGT("Предустановки света");
LSTR MSG_SET_LEDS_RED = _UxGT("Красный");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Оранжевый");
@ -238,7 +239,6 @@ namespace LanguageNarrow_ru {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Белый");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию");
LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {");
LSTR MSG_LEDS2 = _UxGT("Свет #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустан.");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Яркость");
LSTR MSG_CUSTOM_LEDS = _UxGT("Свой цвет подсветки");

View File

@ -271,7 +271,8 @@ namespace LanguageNarrow_sk {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Uložiť sieť bodov");
LSTR MSG_LED_CONTROL = _UxGT("Nastavenie LED");
LSTR MSG_LEDS = _UxGT("Svetlo");
LSTR MSG_LIGHTS = _UxGT("Svetlo");
LSTR MSG_LIGHT_N = _UxGT("Svetlo #{");
LSTR MSG_LED_PRESETS = _UxGT("Predvolby svetla");
LSTR MSG_SET_LEDS_RED = _UxGT("Červená");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Oranžová");
@ -283,7 +284,6 @@ namespace LanguageNarrow_sk {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Biela");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Obnoviť nastavenie");
LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál {");
LSTR MSG_LEDS2 = _UxGT("Svetlo #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Predvolby svetla #2");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jas");
LSTR MSG_CUSTOM_LEDS = _UxGT("Vlastná farba");

View File

@ -217,7 +217,8 @@ namespace LanguageNarrow_sv {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Spara Bädd Nät");
LSTR MSG_LED_CONTROL = _UxGT("LED Kontroll");
LSTR MSG_LEDS = _UxGT("Ljus");
LSTR MSG_LIGHTS = _UxGT("Ljus");
LSTR MSG_LIGHT_N = _UxGT("Ljus #{");
LSTR MSG_LED_PRESETS = _UxGT("Ljus Förinställd");
LSTR MSG_SET_LEDS_RED = _UxGT("Röd");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange");
@ -229,7 +230,6 @@ namespace LanguageNarrow_sv {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Vitt");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard");
LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {");
LSTR MSG_LEDS2 = _UxGT("Ljus #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Ljus #2 Förinställd");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Ljusstyrka");
LSTR MSG_CUSTOM_LEDS = _UxGT("Anpassat Ljus");

View File

@ -274,7 +274,8 @@ namespace LanguageNarrow_tr {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Tabla Mesh Kaydet");
LSTR MSG_LED_CONTROL = _UxGT("LED Kontrolü");
LSTR MSG_LEDS = _UxGT("LEDler");
LSTR MSG_LIGHTS = _UxGT("LEDler");
LSTR MSG_LIGHT_N = _UxGT("ıklar #{");
LSTR MSG_LED_PRESETS = _UxGT("LED Hazır Ayarları");
LSTR MSG_SET_LEDS_RED = _UxGT("Kırmızı");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Turuncu");
@ -286,7 +287,6 @@ namespace LanguageNarrow_tr {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Beyaz");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Varsayılan");
LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {");
LSTR MSG_LEDS2 = _UxGT("ıklar #2");
LSTR MSG_NEO2_PRESETS = _UxGT("ık #2 Ön Ayarları");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Parlaklık");
LSTR MSG_CUSTOM_LEDS = _UxGT("Özel Işıklar");

View File

@ -225,7 +225,8 @@ namespace LanguageNarrow_uk {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Зберегти сітку");
LSTR MSG_LED_CONTROL = _UxGT("Керування світлом");
LSTR MSG_LEDS = _UxGT("Підсвітка");
LSTR MSG_LIGHTS = _UxGT("Підсвітка");
LSTR MSG_LIGHT_N = _UxGT("Світло #{");
LSTR MSG_LED_PRESETS = _UxGT("Передустан. світла");
LSTR MSG_SET_LEDS_RED = _UxGT("Червоний");
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Помаранчевий");
@ -237,7 +238,6 @@ namespace LanguageNarrow_uk {
LSTR MSG_SET_LEDS_WHITE = _UxGT("Білий");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням");
LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {");
LSTR MSG_LEDS2 = _UxGT("Світло #2");
LSTR MSG_NEO2_PRESETS = _UxGT("Передуст. світла #2");
LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Яскравість");
LSTR MSG_CUSTOM_LEDS = _UxGT("Своє світло");

View File

@ -170,7 +170,8 @@ namespace LanguageNarrow_vi {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Lưu lưới bàn");
LSTR MSG_LED_CONTROL = _UxGT("Điều khiển LED"); // LED Control
LSTR MSG_LEDS = _UxGT("Đèn"); // Lights
LSTR MSG_LIGHTS = _UxGT("Đèn"); // Lights
LSTR MSG_LIGHT_N = _UxGT("Đèn #{"); // Light #{
LSTR MSG_LED_PRESETS = _UxGT("Đèn định sẵn"); // Light Presets
LSTR MSG_SET_LEDS_RED = _UxGT("Đỏ"); // Red
LSTR MSG_SET_LEDS_ORANGE = _UxGT("Cam"); // Orange

View File

@ -204,7 +204,8 @@ namespace LanguageNarrow_zh_CN {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存热床网格");
LSTR MSG_LED_CONTROL = _UxGT("LED控制"); // "LED Control"
LSTR MSG_LEDS = _UxGT(""); // "Lights"
LSTR MSG_LIGHTS = _UxGT(""); // "Lights"
LSTR MSG_LIGHT_N = _UxGT("灯 #{"); // "Light #{"
LSTR MSG_LED_PRESETS = _UxGT("灯预置"); // "Light Presets"
LSTR MSG_SET_LEDS_RED = _UxGT(""); // "Red"
LSTR MSG_SET_LEDS_ORANGE = _UxGT(""); // "Orange"

View File

@ -190,7 +190,8 @@ namespace LanguageNarrow_zh_TW {
LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存熱床網格");
LSTR MSG_LED_CONTROL = _UxGT("燈管控制"); // "LED Control"
LSTR MSG_LEDS = _UxGT(""); // "Lights"
LSTR MSG_LIGHTS = _UxGT(""); // "Lights"
LSTR MSG_LIGHT_N = _UxGT("燈 #{"); // "Light #{"
LSTR MSG_LED_PRESETS = _UxGT("燈預置"); // "Light Presets"
LSTR MSG_SET_LEDS_RED = _UxGT(""); // "Red"
LSTR MSG_SET_LEDS_ORANGE = _UxGT(""); // "Orange"

View File

@ -34,9 +34,23 @@
#include "../../feature/power.h"
#endif
#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
#include "../../feature/caselight.h"
void menu_case_light() {
START_MENU();
BACK_ITEM(MSG_CONFIGURATION);
EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true);
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
END_MENU();
}
#endif
#if ENABLED(LED_CONTROL_MENU)
#include "../../feature/leds/leds.h"
#define MSG_LIGHT2_PRESETS TERN(BIQU_BX_TFT70, MSG_LIGHT_ENCODER_PRESETS, MSG_NEO2_PRESETS)
#if ENABLED(LED_COLOR_PRESETS)
void menu_led_presets() {
@ -56,14 +70,14 @@
END_MENU();
}
#endif
#endif // LED_COLOR_PRESETS
#if ENABLED(NEO2_COLOR_PRESETS)
void menu_leds2_presets() {
START_MENU();
#if LCD_HEIGHT > 2
STATIC_ITEM(MSG_NEO2_PRESETS, SS_DEFAULT|SS_INVERT);
STATIC_ITEM(MSG_LIGHT2_PRESETS, SS_DEFAULT|SS_INVERT);
#endif
BACK_ITEM(MSG_LED_CONTROL);
ACTION_ITEM(MSG_SET_LEDS_WHITE, leds2.set_white);
@ -77,11 +91,12 @@
END_MENU();
}
#endif
#endif // NEO2_COLOR_PRESETS
void menu_led_custom() {
START_MENU();
BACK_ITEM(MSG_LED_CONTROL);
#if ENABLED(NEOPIXEL2_SEPARATE)
STATIC_ITEM_N(1, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT);
#endif
@ -94,6 +109,7 @@
#if ENABLED(NEOPIXEL_LED)
EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true);
#endif
#if ENABLED(NEOPIXEL2_SEPARATE)
STATIC_ITEM_N(2, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT);
EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds2.color.r, 0, 255, leds2.update, true);
@ -104,65 +120,61 @@
#endif
EDIT_ITEM(uint8, MSG_NEO2_BRIGHTNESS, &leds2.color.i, 0, 255, leds2.update, true);
#endif
END_MENU();
}
#endif
#if ENABLED(CASE_LIGHT_MENU)
#include "../../feature/caselight.h"
#if CASELIGHT_USES_BRIGHTNESS
void menu_case_light() {
START_MENU();
BACK_ITEM(MSG_CONFIGURATION);
EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true);
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
END_MENU();
}
#endif
#endif
#if ENABLED(LED_CONTROL_MENU)
void menu_led() {
#if ENABLED(CASE_LIGHT_MENU)
const bool has_bright = TERN0(CASELIGHT_USES_BRIGHTNESS, caselight.has_brightness());
#endif
START_MENU();
BACK_ITEM(MSG_MAIN_MENU);
if (TERN1(PSU_CONTROL, powerManager.psu_on)) {
editable.state = leds.lights_on;
EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
#if ENABLED(NEOPIXEL2_SEPARATE) && DISABLED(BIQU_BX_TFT70)
EDIT_ITEM_N(bool, 1, MSG_LIGHT_N, &editable.state, leds.toggle);
#else
EDIT_ITEM(bool, MSG_LIGHTS, &editable.state, leds.toggle);
#endif
}
#if ENABLED(LED_COLOR_PRESETS)
ACTION_ITEM(MSG_SET_LEDS_DEFAULT, [] { leds.set_default(); ui.refresh(); } );
SUBMENU(MSG_LED_PRESETS, menu_led_presets);
#endif
#if ENABLED(NEOPIXEL2_SEPARATE)
editable.state = leds2.lights_on;
EDIT_ITEM(bool, MSG_LEDS2, &editable.state, leds2.toggle);
#if ENABLED(BIQU_BX_TFT70)
EDIT_ITEM(bool, MSG_LIGHT_ENCODER, &editable.state, leds2.toggle);
#else
EDIT_ITEM_N(bool, 2, MSG_LIGHT_N, &editable.state, leds2.toggle);
#endif
#if ENABLED(NEO2_COLOR_PRESETS)
ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds2.set_default);
SUBMENU(MSG_LIGHT2_PRESETS, menu_leds2_presets);
#endif
#endif
#if ENABLED(LED_COLOR_PRESETS)
SUBMENU(MSG_LED_PRESETS, menu_led_presets);
#endif
#if ENABLED(NEO2_COLOR_PRESETS)
SUBMENU(MSG_NEO2_PRESETS, menu_leds2_presets);
#endif
//
// Directly set RGBW and Brightness
//
SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom);
//
// Set Case light on/off/brightness
//
#if ENABLED(CASE_LIGHT_MENU)
#if CASELIGHT_USES_BRIGHTNESS
if (caselight.has_brightness())
if (has_bright) {
#if CASELIGHT_USES_BRIGHTNESS
SUBMENU(MSG_CASE_LIGHT, menu_case_light);
else
#endif
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
#endif
}
else
EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled);
#endif
END_MENU();

View File

@ -386,7 +386,7 @@ void menu_main() {
#endif
#if ENABLED(LED_CONTROL_MENU)
SUBMENU(MSG_LEDS, menu_led);
SUBMENU(MSG_LIGHTS, menu_led);
#elif ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
SUBMENU(MSG_CASE_LIGHT, menu_case_light);
#elif ENABLED(CASE_LIGHT_MENU)