Skip to content

Instantly share code, notes, and snippets.

@Genajoin
Created November 4, 2023 21:48
Show Gist options
  • Save Genajoin/655451b7573668f8cd4ae459c1097220 to your computer and use it in GitHub Desktop.
Save Genajoin/655451b7573668f8cd4ae459c1097220 to your computer and use it in GitHub Desktop.
Calibration Klipper menu for LCD
# https://www.klipper3d.org/Config_Reference.html#menu
# Main
# + Setup
# + Calibration
# + Bed screw man
# + Probe
[menu __main __setup __calib __bedprobe]
type: command
name: Bed probe
enable: {false}
[menu __main __setup __calib __bed_screw_man]
type: list
enable: {(not printer.idle_timeout.state == "Printing")}
name: Bed screw man
[menu __main __setup __calib __bed_screw_man __bed_adjust_start]
type: command
name: Bed adjust start
gcode: BED_SCREWS_ADJUST
[menu __main __setup __calib __bed_screw_man __adjusted]
type: command
name: Adjusted
gcode: ADJUSTED
[menu __main __setup __calib __bed_screw_man __accept]
type: command
name: Accept
gcode: ACCEPT
[menu __main __setup __calib __bed_screw_man __abort]
type: command
name: Abort
gcode: ABORT
[menu __main __setup __calib __probe_calib_man]
type: list
enable: {(not printer.idle_timeout.state == "Printing")}
name: Probe
[menu __main __setup __calib __probe_calib_man __screw_tilt_calc]
type: command
enable: {(not printer.idle_timeout.state == "Printing") and ('screws_tilt_adjust' in printer)}
name: 1.Screws tilt calc
gcode:
MENU_SCREWS_TILT_CALCULATE
[menu __main __setup __calib __probe_calib_man __z_endstop_start]
type: command
name: 2.Z-endstop start
gcode:
MENU_Z_ENDSTOP_CALIBRATE
[menu __main __setup __calib __probe_calib_man __bed_mesh]
type: command
name: 3.Bed mesh
gcode:
BED_MESH_CALIBRATE
[menu __main __setup __calib __probe_calib_man __probe_start]
type: command
name: Probe calibrate
gcode:
MENU_PROBE_CALIBRATE
[menu __main __setup __calib __probe_calib_man __move_z]
type: input
name: Move Z: {'%03.2f' % menu.input}
input: {printer.gcode_move.gcode_position.z}
input_step: 1
realtime: True
gcode:
{%- if menu.event == 'change' -%}
G1 Z{'%.2f' % menu.input}
{%- elif menu.event == 'long_click' -%}
G1 Z{'%.2f' % menu.input}
SAVE_GCODE_STATE NAME=__move__axis
G91
G1 Z2
G1 Z-2
RESTORE_GCODE_STATE NAME=__move__axis
{%- endif -%}
[menu __main __setup __calib __probe_calib_man __test_z]
type: input
name: Test Z: {['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]}
input: 6
input_min: 0
input_max: 11
input_step: 1
gcode:
{%- if menu.event == 'long_click' -%}
TESTZ Z={['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]}
{%- endif -%}
[menu __main __setup __calib __probe_calib_man __accept]
type: command
name: Accept
gcode: ACCEPT
[menu __main __setup __calib __probe_calib_man __abort]
type: command
name: Abort
gcode: ABORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment