Skip to content

Commit

Permalink
🩹 Fix ProUI tramming
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 5, 2023
1 parent ed4e22b commit 16f19b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
28 changes: 10 additions & 18 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@ void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refr
if (isnan(zval))
LCD_MESSAGE(MSG_ZPROBE_OUT);
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;
}
return zval;
Expand All @@ -2375,14 +2375,6 @@ void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refr

#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

void trammingwizard() {
Expand All @@ -2391,14 +2383,14 @@ void setFlow() { setPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, []{ planner.refr
return;
}
bed_mesh_t zval = {0};
zval[0][0] = tramFL();
zval[0][0] = tram(0);
checkkey = ID_NothingToDo;
meshViewer.drawMesh(zval, 2, 2);
zval[1][0] = tramFR();
zval[1][0] = tram(1);
meshViewer.drawMesh(zval, 2, 2);
zval[1][1] = tramBR();
zval[1][1] = tram(2);
meshViewer.drawMesh(zval, 2, 2);
zval[0][1] = tramBL();
zval[0][1] = tram(3);
meshViewer.drawMesh(zval, 2, 2);

DWINUI::drawCenteredString(140, F("Calculating average"));
Expand Down Expand Up @@ -3031,12 +3023,12 @@ void drawPrepareMenu() {
#elif !HAS_BED_PROBE && HAS_ZOFFSET_ITEM
MENU_ITEM_F(ICON_MoveZ0, "Home Z and disable", onDrawMenuItem, homeZAndDisable);
#endif
MENU_ITEM(ICON_Axis, MSG_TRAM_FL, onDrawMenuItem, tramFL);
MENU_ITEM(ICON_Axis, MSG_TRAM_FR, onDrawMenuItem, tramFR);
MENU_ITEM(ICON_Axis, MSG_TRAM_BR, onDrawMenuItem, tramBR);
MENU_ITEM(ICON_Axis, MSG_TRAM_BL, onDrawMenuItem, tramBL);
MENU_ITEM(ICON_Axis, MSG_TRAM_FL, onDrawMenuItem, []{ (void)tram(0); });
MENU_ITEM(ICON_Axis, MSG_TRAM_FR, onDrawMenuItem, []{ (void)tram(1); });
MENU_ITEM(ICON_Axis, MSG_TRAM_BR, onDrawMenuItem, []{ (void)tram(2); });
MENU_ITEM(ICON_Axis, MSG_TRAM_BL, onDrawMenuItem, []{ (void)tram(3); });
#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
}
updateMenu(trammingMenu);
Expand Down
2 changes: 1 addition & 1 deletion buildroot/tests/STM32F103RE_creality
Original file line number Diff line number Diff line change
Expand Up @@ -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_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 \
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
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"
Expand Down

0 comments on commit 16f19b2

Please sign in to comment.