From 8cdeb155727d00aac30fbd5c9e264b9fef15ec49 Mon Sep 17 00:00:00 2001 From: Jeff Perando Date: Thu, 5 Feb 2026 15:37:15 -0800 Subject: [PATCH 1/2] menu: Added new z-offset calibration menu Signed-off-by: Jeff Perando --- klippy/extras/display/menu.cfg | 60 +++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/klippy/extras/display/menu.cfg b/klippy/extras/display/menu.cfg index b0df9fc50..c9fa5b1e2 100644 --- a/klippy/extras/display/menu.cfg +++ b/klippy/extras/display/menu.cfg @@ -133,7 +133,6 @@ realtime: True gcode: SET_GCODE_OFFSET Z={'%.3f' % menu.input} MOVE=1 - ### menu octoprint ### [menu __main __octoprint] type: list @@ -702,6 +701,65 @@ gcode: PID_CALIBRATE HEATER=heater_bed TARGET=60 WRITE_FILE=1 type: list name: Calibration +[menu __main __setup __calib __offsetz] +type: list +enable: {((not printer.idle_timeout.state == "Printing") and ('stepper_z' in printer.configfile.config))} +name: Z-Offset + +[menu __main __setup __calib __offsetz __begin_probe] +type: command +name: Begin probe calibration +enable: {('probe' in printer) or ('bltouch' in printer)} +gcode: + ABORT + G28 + PROBE_CALIBRATE + +[menu __main __setup __calib __offsetz __begin_endstop] +type: command +name: Begin Z-endstop calibration +enable: {('position_endstop' in printer.configfile.config.stepper_z)} +gcode: + ABORT + G28 + Z_ENDSTOP_CALIBRATE + +[menu __main __setup __calib __offsetz __test] +type: input +name: Delta: {'%05.3f' % menu.input} +input: 0 +input_min: -5 +input_max: 5 +input_step: 0.005 +gcode: + {%- if menu.input > 0 -%} + TESTZ Z=+{'%.3f' % menu.input} + {%- elif menu.input < 0 -%} + TESTZ Z={'%.3f' % menu.input} + {%- endif -%} + +[menu __main __setup __calib __offsetz __prev] +type: command +name: Undo +gcode: TESTZ Z=-- + +[menu __main __setup __calib __offsetz __next] +type: command +name: Redo +gcode: TESTZ Z=++ + +[menu __main __setup __calib __offsetz __abort] +type: command +name: Cancel +gcode: ABORT + +[menu __main __setup __calib __offsetz __end] +type: command +name: Finish +gcode: + ACCEPT + SAVE_CONFIG + [menu __main __setup __calib __delta_calib_auto] type: command enable: {(not printer.idle_timeout.state == "Printing") and ('delta_calibrate' in printer)} From 1cd36ec0fd7ad2c3bb93035f4cb66807851342d2 Mon Sep 17 00:00:00 2001 From: Jeff Perando Date: Fri, 6 Feb 2026 05:27:24 -0800 Subject: [PATCH 2/2] menu: don't home if printer is already homed Signed-off-by: Jeff Perando --- klippy/extras/display/menu.cfg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/klippy/extras/display/menu.cfg b/klippy/extras/display/menu.cfg index c9fa5b1e2..a5c4d4309 100644 --- a/klippy/extras/display/menu.cfg +++ b/klippy/extras/display/menu.cfg @@ -712,7 +712,9 @@ name: Begin probe calibration enable: {('probe' in printer) or ('bltouch' in printer)} gcode: ABORT - G28 + {% if 'z' not in printer.toolhead.homed_axes %} + G28 + {% endif %} PROBE_CALIBRATE [menu __main __setup __calib __offsetz __begin_endstop] @@ -721,7 +723,9 @@ name: Begin Z-endstop calibration enable: {('position_endstop' in printer.configfile.config.stepper_z)} gcode: ABORT - G28 + {% if 'z' not in printer.toolhead.homed_axes %} + G28 + {% endif %} Z_ENDSTOP_CALIBRATE [menu __main __setup __calib __offsetz __test]