diff --git a/display_menu.cfg b/display_menu.cfg index 1e4eef7..82a3eef 100644 --- a/display_menu.cfg +++ b/display_menu.cfg @@ -74,23 +74,37 @@ name: Z offset [menu __main __setup __calib __Z_offset __start] type: input enable: {not printer.idle_timeout.state == "Printing"} -name: Do {['None','Probe','Endstop'][menu.input|int]} +name: Do {['None','Home','Probe','Endstop'][menu.input|int]} input: 0 input_min: 0 -input_max: 2 +input_max: 3 input_step: 1 gcode: {%- if menu.event == 'long_click' -%} {menu.back()} - {%- if menu.input|int == 1 -%} - {action_respond_info("Start Probe calibration")} - PROBE_CALIBRATE - {%- elif menu.input|int == 2 -%} - {action_respond_info(" Start Z-Endstop calibration")} - Z_ENDSTOP_CALIBRATE + {%- endif -%} + {%- if menu.input|int == 1 -%} + {action_respond_info("Start Homing")} + G28 + {%- elif menu.input|int == 2 -%} + {% if "xyz" in printer.toolhead.homed_axes %} + {action_respond_info("Start Probe calibration")} + G0 X150 Y150 F10000 + PROBE_CALIBRATE + {%- else -%} + {action_respond_info("Printer not homed")} + {%- endif -%} + {%- elif menu.input|int == 3 -%} + {% if "xyz" in printer.toolhead.homed_axes %} + {action_respond_info(" Start Z-Endstop calibration")} + G0 X150 Y150 F10000 + Z_ENDSTOP_CALIBRATE + {%- else -%} + {action_respond_info("Printer not homed")} {%- endif -%} {%- endif -%} + [menu __main __setup __calib __Z_offset __move_z] type: input name: Move Z: {'%03.2f' % menu.input} @@ -143,3 +157,8 @@ gcode: ACCEPT type: command name: Abort gcode: ABORT + +[menu __main __setup __calib __Z_offset __saveconfig] +type: command +name: Save config +gcode: SAVE_CONFIG