Merge branch 'screws' of github.com:bassamanator/Sovol-SV06-firmware into screws. Many adjustments to G34 macro.

This commit is contained in:
Bassam Husain
2023-02-06 23:06:31 -05:00
2 changed files with 9 additions and 6 deletions

View File

@@ -48,7 +48,7 @@
[gcode_macro MECHANICAL_GANTRY_CALIBRATION]
gcode:
### SET THIS DEFAULT CARFULLY - start really low
{% set my_current = params.CURRENT|default(0.12)|float %} ; adjust crash current on the fly :D
{% set my_current = params.CURRENT|default(0.20)|float %} ; adjust crash current on the fly :D
###
{% set oldcurrent = printer.configfile.settings["tmc2209 stepper_z"].run_current %} ; TODO: Find runtime current settings
{% set oldhold = printer.configfile.settings["tmc2209 stepper_z"].hold_current %}
@@ -64,7 +64,7 @@ gcode:
G90 ; absolute
G0 X{x_max / 2} Y{y_max / 2} F{fast_move * 30 } ;put toolhead in the center of the gantry
G0 Z{z_max -1} F{fast_move_z * 60 } ; go to the Z-max at speed max z speed
G0 Z{z_max -5} F{fast_move_z * 60 } ; go to the Z-max at speed max z speed ; CHANGED
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={my_current} ; drop current on Z stepper
@@ -72,13 +72,16 @@ gcode:
SET_TMC_CURRENT STEPPER=stepper_z1 CURRENT={my_current} ; drop current
{% endif %}
BEEP I=1
G4 P200 ; Probably not necessary, it is here just for sure
SET_KINEMATIC_POSITION Z={z_max - 12} ; Trick printer into beleiving the gantry is 12mm lower than it is
SET_KINEMATIC_POSITION Z={z_max - 17} ; Trick printer into beleiving the gantry is 17mm lower than it is ; CHANGED
G1 Z{z_max -2} F{6 * 60} ; try to move 10mm up
G4 P200 ; wait
G1 Z{z_max} F{6 * 60} ; try to move 17mm up ; CHANGED
BEEP I=2
G4 P10000 ; wait 10 seconds
G1 Z{z_max -6} F{6 * 60} ; move 4mm down
BEEP I=3
G4 P200 ; same as the first one
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={oldcurrent} HOLDCURRENT={oldhold}