diff --git a/martyn_macros.cfg b/martyn_macros.cfg index 4666a68..a1548be 100644 --- a/martyn_macros.cfg +++ b/martyn_macros.cfg @@ -342,6 +342,12 @@ gcode: [gcode_macro _SAFE_Z_HOME] ; this macro recreates the save_z_home setup center the toolhead before z home. gcode: + {% if not 'X' in printer.toolhead.homed_axes %} + _SAFE_X_HOME + {% endif %} + {% if not 'Y' in printer.toolhead.homed_axes %} + G28 Y + {% endif %} G0 X175 Y175 F50000 G28 Z @@ -360,6 +366,8 @@ gcode: {% elif not 'Z' in params and 'X' in params and 'Y' in params %} #Home X+Y _SAFE_X_HOME G28 Y + {% elif 'Z' in params and not 'X' in params and not 'Y' in params %} # Home Z + _SAFE_Z_HOME {% else %} #Home X+Y+Z _SAFE_X_HOME G28 Y