1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

🩹 Fix ProUI tramming

This commit is contained in:
Scott Lahteine 2023-07-04 19:19:44 -05:00
parent ed4e22b548
commit 16f19b2c1f
2 changed files with 11 additions and 19 deletions

View File

@ -2357,7 +2357,7 @@ void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refr
if (isnan(zval)) if (isnan(zval))
LCD_MESSAGE(MSG_ZPROBE_OUT); LCD_MESSAGE(MSG_ZPROBE_OUT);
else else
ui.set_status(TS(F("X:"), p_float_t(xpos, 1), F(" Y:"), p_float_t(ypos, 1), F(" Z:"))); ui.set_status(TS(F("X:"), p_float_t(xpos, 1), F(" Y:"), p_float_t(ypos, 1), F(" Z:"), p_float_t(zval, 2)));
inLev = false; inLev = false;
} }
return zval; return zval;
@ -2375,14 +2375,6 @@ void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refr
#endif #endif
inline void tramFL() { tram(0); }
inline void tramFR() { tram(1); }
inline void tramBR() { tram(2); }
inline void tramBL() { tram(3); }
#if ENABLED(BED_TRAMMING_INCLUDE_CENTER)
inline void tramC() { tram(4); }
#endif
#if HAS_BED_PROBE && HAS_MESH #if HAS_BED_PROBE && HAS_MESH
void trammingwizard() { void trammingwizard() {
@ -2391,14 +2383,14 @@ void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refr
return; return;
} }
bed_mesh_t zval = {0}; bed_mesh_t zval = {0};
zval[0][0] = tramFL(); zval[0][0] = tram(0);
checkkey = ID_NothingToDo; checkkey = ID_NothingToDo;
meshViewer.drawMesh(zval, 2, 2); meshViewer.drawMesh(zval, 2, 2);
zval[1][0] = tramFR(); zval[1][0] = tram(1);
meshViewer.drawMesh(zval, 2, 2); meshViewer.drawMesh(zval, 2, 2);
zval[1][1] = tramBR(); zval[1][1] = tram(2);
meshViewer.drawMesh(zval, 2, 2); meshViewer.drawMesh(zval, 2, 2);
zval[0][1] = tramBL(); zval[0][1] = tram(3);
meshViewer.drawMesh(zval, 2, 2); meshViewer.drawMesh(zval, 2, 2);
DWINUI::drawCenteredString(140, F("Calculating average")); DWINUI::drawCenteredString(140, F("Calculating average"));
@ -3031,12 +3023,12 @@ void drawPrepareMenu() {
#elif !HAS_BED_PROBE && HAS_ZOFFSET_ITEM #elif !HAS_BED_PROBE && HAS_ZOFFSET_ITEM
MENU_ITEM_F(ICON_MoveZ0, "Home Z and disable", onDrawMenuItem, homeZAndDisable); MENU_ITEM_F(ICON_MoveZ0, "Home Z and disable", onDrawMenuItem, homeZAndDisable);
#endif #endif
MENU_ITEM(ICON_Axis, MSG_TRAM_FL, onDrawMenuItem, tramFL); MENU_ITEM(ICON_Axis, MSG_TRAM_FL, onDrawMenuItem, []{ (void)tram(0); });
MENU_ITEM(ICON_Axis, MSG_TRAM_FR, onDrawMenuItem, tramFR); MENU_ITEM(ICON_Axis, MSG_TRAM_FR, onDrawMenuItem, []{ (void)tram(1); });
MENU_ITEM(ICON_Axis, MSG_TRAM_BR, onDrawMenuItem, tramBR); MENU_ITEM(ICON_Axis, MSG_TRAM_BR, onDrawMenuItem, []{ (void)tram(2); });
MENU_ITEM(ICON_Axis, MSG_TRAM_BL, onDrawMenuItem, tramBL); MENU_ITEM(ICON_Axis, MSG_TRAM_BL, onDrawMenuItem, []{ (void)tram(3); });
#if ENABLED(BED_TRAMMING_INCLUDE_CENTER) #if ENABLED(BED_TRAMMING_INCLUDE_CENTER)
MENU_ITEM(ICON_Axis, MSG_TRAM_C, onDrawMenuItem, tramC); MENU_ITEM(ICON_Axis, MSG_TRAM_C, onDrawMenuItem, []{ (void)tram(4); });
#endif #endif
} }
updateMenu(trammingMenu); updateMenu(trammingMenu);

View File

@ -27,7 +27,7 @@ use_example_configs "Creality/Ender-3 S1/STM32F1"
opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT
opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT STATUS_MESSAGE_SCROLLING \ opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT STATUS_MESSAGE_SCROLLING \
SOUND_MENU_ITEM PRINTCOUNTER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR \ SOUND_MENU_ITEM PRINTCOUNTER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR \
BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU \ BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU LCD_BED_TRAMMING \
LIMITED_MAX_FR_EDITING LIMITED_MAX_ACCEL_EDITING LIMITED_JERK_EDITING BAUD_RATE_GCODE LIMITED_MAX_FR_EDITING LIMITED_MAX_ACCEL_EDITING LIMITED_JERK_EDITING BAUD_RATE_GCODE
opt_set PREHEAT_3_LABEL '"CUSTOM"' PREHEAT_3_TEMP_HOTEND 240 PREHEAT_3_TEMP_BED 60 PREHEAT_3_FAN_SPEED 128 BOOTSCREEN_TIMEOUT 1100 opt_set PREHEAT_3_LABEL '"CUSTOM"' PREHEAT_3_TEMP_HOTEND 240 PREHEAT_3_TEMP_BED 60 PREHEAT_3_FAN_SPEED 128 BOOTSCREEN_TIMEOUT 1100
exec_test $1 $2 "Ender-3 S1 - ProUI (PIDTEMP)" "$3" exec_test $1 $2 "Ender-3 S1 - ProUI (PIDTEMP)" "$3"