printer: update

This commit is contained in:
Konstantin Koslowski 2023-01-22 13:53:32 +01:00
parent 991c3266e1
commit 8e18789e1c
2 changed files with 42 additions and 46 deletions

View file

@ -23,7 +23,7 @@ gcode:
{% set x0=250 %}
{% set x1=200 %}
{% set y0=printer.toolhead.axis_maximum.y %}
{% set z0=1.0 %}
{% set z0=2.5 %}
# {% set z_hop = printer['gcode_macro _USER_VARIABLE'].z_hop|int %}
{% set z_hop = 10 %}
{% if "xyz" in printer.toolhead.homed_axes %}
@ -85,25 +85,23 @@ gcode:
[gcode_macro PARK]
gcode:
{% set Y=params.Y|default(295) %}
{% set X=params.X|default(295) %}
{% set Z=params.Z|default(-1) %}
{% if "xyz" in printer.toolhead.homed_axes %}
# set park positon for x and y
## close to max
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% if Y != y_park %}
{% set y_park = Y %}
{% endif %}
# calculate save lift position
{% set z_max = printer.toolhead.axis_maximum.z|float %}
{% set z_act = printer.toolhead.position.z|float %}
{% set z_safe = z_act + 10 %}
{% set z_safe = z_act + 5 %}
{% if z_safe > z_max %}
{% set z_safe = z_max %}
{% endif %}
{% if Z != - 1 %}
{% set z_safe = Z %}
{% endif %}
G91 # use relative coordinates
G0 Z{z_safe} F1200
G90 # use absolute coordinates
G0 X{x_park} Y{y_park} F6000
G0 X{X} Y{Y} F6000
{% else %}
M118 printer not homed
{% endif %}
@ -114,15 +112,6 @@ gcode:
rename_existing: _PAUSE_BASE
gcode:
{% if printer.pause_resume.is_paused|lower == 'false' %}
{% set x_park = printer.toolhead.axis_minimum.x|float + 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 5.0) %}
{% set z_safe = 5.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
G92 E0
{% if printer.extruder.can_extrude %}
G1 E-1.0 F1500.0
@ -130,10 +119,7 @@ gcode:
G90 # use absolute coordinates
SAVE_GCODE_STATE NAME=PAUSE_state
_PAUSE_BASE
G91 # use relative coordinates
G1 Z{z_safe} F900
G90 # use absolute coordinates
G0 X{x_park} Y{y_park} F6000
PARK
{% else %}
M117 already paused
M118 already paused
@ -145,6 +131,7 @@ gcode:
gcode:
{% set BED=params.BED|default(100)|int %}
{% set EXTRUDER=params.EXTRUDER|default(250)|int %}
{% set QGL=params.QGL|default(1)|int %}
{% set BMC=params.BMC|default(0)|int %}
{% set SHEET=params.SHEET|default("default")|string %}
{% set PURGE=params.PURGE|default(1)|int %}
@ -167,10 +154,17 @@ gcode:
M117 HOME
M118 HOME
G28
BRUSHIE
G28 Z
# QGL
M117 QGL
M118 QGL
QUAD_GANTRY_LEVEL PARK=false
{% if QGL %}
M117 QGL
M118 QGL
QUAD_GANTRY_LEVEL
{% else %}
M117 NO QGL
M118 NO QGL
{% endif %}
# BMC
{% if BMC %}
M117 BED MESH CALIBRATE
@ -181,11 +175,13 @@ gcode:
M118 BED MESH LOAD {SHEET}
BED_MESH_PROFILE LOAD={SHEET}
{% endif %}
PARK Z=10
G92 E0 # reset extruder
G90 # use absolute coordinates
NOTIFY_BED BED={BED}
M190 S{BED} # set and wait for actual bed temperature
NOTIFY_EXTRUDER EXTRUDER={BED}
M109 S{EXTRUDER} # set and wait for extruder temperature
SET_GCODE_OFFSET Z_ADJUST={params.Z_ADJUST|default(0.0)|float} MOVE=1
@ -196,9 +192,9 @@ gcode:
ERCF_CHANGE_TOOL_SLICER TOOL={ERCF_EXTRUDER}
{% endif %}
BRUSHIE
{% if PURGE %}
PURGE_NOZZLE
{% endif %}
# {% if PURGE %}
# PURGE_NOZZLE
# {% endif %}
M117 STARTING
M118 STARTING