-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fixes for ProUI, build rename (#26177)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
- Loading branch information
1 parent
1d17c34
commit f7d5188
Showing
9 changed files
with
61 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,13 +214,13 @@ Menu *prepareMenu = nullptr; | |
Menu *trammingMenu = nullptr; | ||
#endif | ||
Menu *moveMenu = nullptr; | ||
Menu *ControlMenu = nullptr; | ||
Menu *AdvancedSettings = nullptr; | ||
Menu *controlMenu = nullptr; | ||
Menu *advancedSettingsMenu = nullptr; | ||
#if HAS_HOME_OFFSET | ||
Menu *homeOffsetMenu = nullptr; | ||
#endif | ||
#if HAS_BED_PROBE | ||
Menu *ProbeSetMenu = nullptr; | ||
Menu *probeSettingsMenu = nullptr; | ||
#endif | ||
Menu *filSetMenu = nullptr; | ||
Menu *selectColorMenu = nullptr; | ||
|
@@ -229,7 +229,7 @@ Menu *tuneMenu = nullptr; | |
Menu *motionMenu = nullptr; | ||
Menu *filamentMenu = nullptr; | ||
#if ENABLED(MESH_BED_LEVELING) | ||
Menu *manualMesh = nullptr; | ||
Menu *manualMeshMenu = nullptr; | ||
#endif | ||
#if HAS_PREHEAT | ||
Menu *preheatMenu = nullptr; | ||
|
@@ -251,7 +251,7 @@ Menu *stepsMenu = nullptr; | |
#if ENABLED(PIDTEMPBED) && ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU) | ||
Menu *bedPIDMenu = nullptr; | ||
#endif | ||
#if ENABLED(CASELIGHT_USES_BRIGHTNESS) | ||
#if CASELIGHT_USES_BRIGHTNESS | ||
Menu *caseLightMenu = nullptr; | ||
#endif | ||
#if ENABLED(LED_CONTROL_MENU) | ||
|
@@ -2152,9 +2152,10 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, | |
toggleCheckboxLine(caselight.on); | ||
caselight.update_enabled(); | ||
} | ||
#if ENABLED(CASELIGHT_USES_BRIGHTNESS) | ||
#if CASELIGHT_USES_BRIGHTNESS | ||
bool enableLiveCaseLightBrightness = true; | ||
void liveCaseLightBrightness() { caselight.brightness = menuData.value; caselight.update_brightness(); } | ||
void setCaseLightBrightness() { setIntOnClick(0, 255, caselight.brightness, nullptr, liveCaseLightBrightness); } | ||
void setCaseLightBrightness() { setIntOnClick(0, 255, caselight.brightness, liveCaseLightBrightness, enableLiveCaseLightBrightness ? liveCaseLightBrightness : nullptr); } | ||
#endif | ||
#endif | ||
|
||
|
@@ -2166,10 +2167,12 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, | |
} | ||
#endif | ||
#if HAS_COLOR_LEDS | ||
bool enableLiveLedColor = true; | ||
void applyLEDColor() { | ||
hmiData.ledColor = LEDColor( {leds.color.r, leds.color.g, leds.color.b OPTARG(HAS_WHITE_LED, hmiData.ledColor.w) } ); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
GHGiampy
Author
Contributor
|
||
if (!enableLiveLedColor) leds.update(); | ||
} | ||
void liveLEDColor(uint8_t *color) { *color = menuData.value; leds.update(); } | ||
void liveLEDColor(uint8_t *color) { *color = menuData.value; if (enableLiveLedColor) leds.update(); } | ||
void liveLEDColorR() { liveLEDColor(&leds.color.r); } | ||
void liveLEDColorG() { liveLEDColor(&leds.color.g); } | ||
void liveLEDColorB() { liveLEDColor(&leds.color.b); } | ||
|
@@ -3039,35 +3042,37 @@ void drawPrepareMenu() { | |
|
||
void drawControlMenu() { | ||
checkkey = ID_Menu; | ||
if (SET_MENU_R(ControlMenu, selrect({103, 1, 28, 14}), MSG_CONTROL, 11)) { | ||
if (SET_MENU_R(controlMenu, selrect({103, 1, 28, 14}), MSG_CONTROL, 11)) { | ||
BACK_ITEM(gotoMainMenu); | ||
MENU_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawTempSubMenu, drawTemperatureMenu); | ||
MENU_ITEM(ICON_Motion, MSG_MOTION, onDrawMotionSubMenu, drawMotionMenu); | ||
#if ENABLED(EEPROM_SETTINGS) | ||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM); | ||
MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM); | ||
MENU_ITEM(ICON_ResumeEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM); | ||
#endif | ||
MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter); | ||
#if ENABLED(CASE_LIGHT_MENU) | ||
#if ENABLED(CASELIGHT_USES_BRIGHTNESS) | ||
#if CASELIGHT_USES_BRIGHTNESS | ||
enableLiveCaseLightBrightness = true; // Allow live update of brightness in control menu | ||
MENU_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawSubMenu, drawCaseLightMenu); | ||
#else | ||
MENU_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); | ||
#endif | ||
#endif | ||
#if ENABLED(LED_CONTROL_MENU) | ||
enableLiveLedColor = true; // Allow live update of color in control menu | ||
MENU_ITEM(ICON_LedControl, MSG_LED_CONTROL, onDrawSubMenu, drawLedControlMenu); | ||
#endif | ||
#if ENABLED(EEPROM_SETTINGS) | ||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM); | ||
MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM); | ||
MENU_ITEM(ICON_ResumeEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM); | ||
#endif | ||
MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter); | ||
MENU_ITEM(ICON_Info, MSG_INFO_SCREEN, onDrawInfoSubMenu, gotoInfoMenu); | ||
} | ||
ui.reset_status(true); | ||
updateMenu(ControlMenu); | ||
updateMenu(controlMenu); | ||
} | ||
|
||
void drawAdvancedSettingsMenu() { | ||
checkkey = ID_Menu; | ||
if (SET_MENU(AdvancedSettings, MSG_ADVANCED_SETTINGS, 23)) { | ||
if (SET_MENU(advancedSettingsMenu, MSG_ADVANCED_SETTINGS, 23)) { | ||
BACK_ITEM(gotoMainMenu); | ||
#if ENABLED(EEPROM_SETTINGS) | ||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM); | ||
|
@@ -3129,7 +3134,7 @@ void drawAdvancedSettingsMenu() { | |
#endif | ||
} | ||
ui.reset_status(true); | ||
updateMenu(AdvancedSettings); | ||
updateMenu(advancedSettingsMenu); | ||
} | ||
|
||
void drawMoveMenu() { | ||
|
@@ -3180,7 +3185,7 @@ void drawMoveMenu() { | |
|
||
void drawProbeSetMenu() { | ||
checkkey = ID_Menu; | ||
if (SET_MENU(ProbeSetMenu, MSG_ZPROBE_SETTINGS, 9)) { | ||
if (SET_MENU(probeSettingsMenu, MSG_ZPROBE_SETTINGS, 9)) { | ||
BACK_ITEM(drawAdvancedSettingsMenu); | ||
#if HAS_X_AXIS | ||
EDIT_ITEM(ICON_ProbeOffsetX, MSG_ZPROBE_XOFFSET, onDrawPFloatMenu, setProbeOffsetX, &probe.offset.x); | ||
|
@@ -3203,7 +3208,7 @@ void drawMoveMenu() { | |
MENU_ITEM(ICON_ProbeTest, MSG_M48_TEST, onDrawMenuItem, probeTest); | ||
#endif | ||
} | ||
updateMenu(ProbeSetMenu); | ||
updateMenu(probeSettingsMenu); | ||
} | ||
|
||
#endif // HAS_BED_PROBE | ||
|
@@ -3251,7 +3256,7 @@ void drawFilSetMenu() { | |
void drawLedControlMenu() { | ||
checkkey = ID_Menu; | ||
if (SET_MENU(ledControlMenu, MSG_LED_CONTROL, 10)) { | ||
BACK_ITEM(drawControlMenu); | ||
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); | ||
#endif | ||
|
@@ -3282,7 +3287,7 @@ void drawFilSetMenu() { | |
|
||
void drawTuneMenu() { | ||
checkkey = ID_Menu; | ||
if (SET_MENU_R(tuneMenu, selrect({73, 2, 28, 12}), MSG_TUNE, 17)) { | ||
if (SET_MENU_R(tuneMenu, selrect({73, 2, 28, 12}), MSG_TUNE, 18)) { | ||
BACK_ITEM(gotoPrintProcess); | ||
EDIT_ITEM(ICON_Speed, MSG_SPEED, onDrawSpeedItem, setSpeed, &feedrate_percentage); | ||
#if HAS_HOTEND | ||
|
@@ -3327,6 +3332,16 @@ void drawTuneMenu() { | |
#endif | ||
#if ENABLED(CASE_LIGHT_MENU) | ||
EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); | ||
#if CASELIGHT_USES_BRIGHTNESS | ||
// Avoid heavy interference with print job disabling live update of brightness in tune menu | ||
enableLiveCaseLightBrightness = false; | ||
EDIT_ITEM(ICON_Brightness, MSG_CASE_LIGHT_BRIGHTNESS, onDrawPInt8Menu, setCaseLightBrightness, &caselight.brightness); | ||
#endif | ||
#if ENABLED(LED_CONTROL_MENU) | ||
// Avoid heavy interference with print job disabling live update of color in tune menu | ||
enableLiveLedColor = false; | ||
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); | ||
#endif | ||
|
@@ -3478,15 +3493,15 @@ void drawMotionMenu() { | |
|
||
void drawManualMeshMenu() { | ||
checkkey = ID_Menu; | ||
if (SET_MENU(manualMesh, MSG_UBL_MANUAL_MESH, 6)) { | ||
if (SET_MENU(manualMeshMenu, MSG_UBL_MANUAL_MESH, 6)) { | ||
BACK_ITEM(drawPrepareMenu); | ||
MENU_ITEM(ICON_ManualMesh, MSG_LEVEL_BED, onDrawMenuItem, manualMeshStart); | ||
mMeshMoveZItem = EDIT_ITEM(ICON_Zoffset, MSG_MOVE_Z, onDrawMMeshMoveZ, setMMeshMoveZ, ¤t_position.z); | ||
MENU_ITEM(ICON_Axis, MSG_UBL_CONTINUE_MESH, onDrawMenuItem, manualMeshContinue); | ||
MENU_ITEM(ICON_MeshViewer, MSG_MESH_VIEW, onDrawSubMenu, dwinMeshViewer); | ||
MENU_ITEM(ICON_MeshSave, MSG_UBL_SAVE_MESH, onDrawMenuItem, manualMeshSave); | ||
} | ||
updateMenu(manualMesh); | ||
updateMenu(manualMeshMenu); | ||
} | ||
|
||
#endif // MESH_BED_LEVELING | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
just a quick curiosity:
at the end of this line it says
hmiData.ledColor.w
but line 2183 hashow can setting the LED color for white (im guessing just sets the brightness) be for
led.color.w
when its also being applied inhmiData.ledColor.w
??