diff --git a/meta-opencentauri/recipes-apps/klipper/files/macros.cfg b/meta-opencentauri/recipes-apps/klipper/files/macros.cfg index df54ed8a..4b09ad64 100644 --- a/meta-opencentauri/recipes-apps/klipper/files/macros.cfg +++ b/meta-opencentauri/recipes-apps/klipper/files/macros.cfg @@ -231,8 +231,8 @@ gcode: gcode: {% set global = printer['gcode_macro _global_var'] %} - {% if "xyz" not in printer.toolhead.homed_axes %} - G28 ; Home if necessary + {% if "xy" not in printer.toolhead.homed_axes %} + G28 XY ; Home if necessary {% endif %} # Move to purge position MOVE_TO_TRAY @@ -261,8 +261,8 @@ gcode: {% set toolhead_target = printer.extruder.target|int %} BED_MESH_CLEAR M104 S{global.extruder_temp.cleaning} - {% if printer.toolhead.homed_axes != "xyz" %} - G28 + {% if "xy" not in printer.toolhead.homed_axes %} + G28 XY ; Home if necessary {% endif %} G90 @@ -305,8 +305,8 @@ gcode: [gcode_macro MOVE_TO_TRAY] gcode: - {% if "xyz" not in printer.toolhead.homed_axes %} - G28 ; Home if necessary + {% if "xy" not in printer.toolhead.homed_axes %} + G28 XY ; Home if necessary {% endif %} {% if printer.gcode_move.position.x > 201.5 and printer.gcode_move.position.x < 202.5 and printer.gcode_move.position.y > 264.5 and printer.gcode_move.position.y < 265.5 %} @@ -398,8 +398,8 @@ gcode: RESPOND TYPE=command MSG="action:prompt_text Wait for hotend to heat up" RESPOND TYPE=command MSG="action:prompt_show" - {% if "xyz" not in printer.toolhead.homed_axes %} - G28 ; Home if necessary + {% if "xy" not in printer.toolhead.homed_axes %} + G28 XY ; Home if necessary {% endif %} MOVE_TO_TRAY ; Move to the tray @@ -416,14 +416,14 @@ gcode: [gcode_macro UNLOAD_FILAMENT] gcode: - {% if "xyz" not in printer.toolhead.homed_axes %} - G28 ; Home if necessary + {% if "xy" not in printer.toolhead.homed_axes %} + G28 XY ; Home if necessary {% endif %} - ; Absolute positioning - CUT_FILAMENT ; Wait for movements to complete - MOVE_TO_TRAY - COLD_EXTRUDE HEATER=extruder ENABLE=1 ; Move to the tray + CUT_FILAMENT + + MOVE_TO_TRAY ; Move to the tray + COLD_EXTRUDE HEATER=extruder ENABLE=1 G1 E-30 F600 COLD_EXTRUDE HEATER=extruder ENABLE=0 G0 Y250 @@ -431,8 +431,8 @@ gcode: [gcode_macro CUT_FILAMENT] gcode: - {% if "xyz" not in printer.toolhead.homed_axes %} - G28 ; Home if necessary + {% if "xy" not in printer.toolhead.homed_axes %} + G28 XY ; Home if necessary {% endif %} G90 @@ -455,11 +455,18 @@ gcode: G28 Y G0 X128 Y128 F4800 G28 Z + {% elif 'X' in rawparams and 'Y' in rawparams %} + G28 Y + G28 X + G28 Y + {% if 'Z' in rawparams %} + G0 X128 Y128 F4800 + G28 Z + {% endif %} {% else %} {% if 'X' in rawparams %} G28 X - {% endif %} - {% if 'Y' in rawparams %} + {% elif 'Y' in rawparams %} G28 Y {% endif %} {% if 'Z' in rawparams %}