This commit is contained in:
Cyril 2024-05-29 00:13:52 +02:00
parent 32c970116f
commit 70268f003f
17 changed files with 1007 additions and 247 deletions

View file

@ -13,16 +13,20 @@ description: Saving Z-Offset
rename_existing: _SET_GCODE_OFFSET
gcode:
{% if printer.save_variables.variables.zoffset %}
{% set zoffset = printer.save_variables.variables.zoffset %}
{% set zoffset = printer.save_variables.variables.zoffset %}
{% else %}
{% set zoffset = {'z': None} %}
{% set zoffset = {'z': None} %}
{% endif %}
{% set ns = namespace(zoffset={'z': zoffset.z}) %}
_SET_GCODE_OFFSET {% for p in params %}{'%s=%s '% (p, params[p])}{% endfor %}
{%if 'Z' in params %}{% set null = ns.zoffset.update({'z': params.Z}) %}{% endif %}
{%if 'Z' in params %}
{% set null = ns.zoffset.update({'z': params.Z}) %}
{% endif %}
{%if 'Z_ADJUST' in params %}
{%if ns.zoffset.z == None %}{% set null = ns.zoffset.update({'z': 0}) %}{% endif %}
{% set null = ns.zoffset.update({'z': (ns.zoffset.z | float) + (params.Z_ADJUST | float)}) %}
{%if ns.zoffset.z == None %}
{% set null = ns.zoffset.update({'z': 0}) %}
{% endif %}
{% set null = ns.zoffset.update({'z': (ns.zoffset.z | float) + (params.Z_ADJUST | float)}) %}
{% endif %}
SAVE_VARIABLE VARIABLE=zoffset VALUE="{ns.zoffset}"
@ -31,8 +35,8 @@ gcode:
initial_duration: 2
gcode:
{% if printer.save_variables.variables.zoffset %}
{% set zoffset = printer.save_variables.variables.zoffset %}
_SET_GCODE_OFFSET {% for axis, offset in zoffset.items() if zoffset[axis] %}{ "%s=%s " % (axis, offset) }{% endfor %}
RESPOND TYPE=command MSG="Loaded Z-Offset from variables.cfg: {zoffset.z}mm"
{% set zoffset = printer.save_variables.variables.zoffset %}
_SET_GCODE_OFFSET {% for axis, offset in zoffset.items() if zoffset[axis] %}{ "%s=%s " % (axis, offset) }{% endfor %}
RESPOND TYPE=command MSG="Loaded Z-Offset from variables.cfg: {zoffset.z}mm"
{% endif %}

View file

@ -0,0 +1,25 @@
########################################
# Screws Tilt Adjust for Ender-3 V3 KE
########################################
[screws_tilt_adjust]
screw1: 27.5, -0.5
screw1_name: front left screw
screw2: 196.5, -0.5
screw2_name: front right screw
screw3: 196.5, 169.5
screw3_name: rear right screw
screw4: 27.5, 169.5
screw4_name: rear left screw
horizontal_move_z: 5
speed: 150
screw_thread: CCW-M4
[gcode_macro SCREWS_CALIBRATION]
description: Start Bed Screws Calibration
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
SCREWS_TILT_CALCULATE