doom-micron/sensorless_contact.cfg

25 lines
805 B
INI

[gcode_macro _HOME_PRE_AXIS]
gcode:
# Adapt this for your printer.
{% set HOME_CURRENT = 0.5 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
[gcode_macro _HOME_POST_AXIS]
gcode:
{% set axis = params.AXIS %}
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
# Move away
SAVE_GCODE_STATE NAME=home_post_axis
G91
G0 {axis}-10 F3600
RESTORE_GCODE_STATE NAME=home_post_axis
# Make sure StallGuard registers are cleared
M400
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}