diff --git a/macros/z_tramming.cfg b/macros/z_tramming.cfg index b08d1de..5be7a6c 100644 --- a/macros/z_tramming.cfg +++ b/macros/z_tramming.cfg @@ -13,9 +13,6 @@ gcode: {% if config is undefined %} {action_raise_error("Missing _Z_TRAMMING_SETTINGS macro")} {% endif %} - {% if config.screw_lead is undefined %} - {action_raise_error("Missing screw_lead in _Z_TRAMMING_SETTINGS macro")} - {% endif %} {% set speed = config.speed | default(printer.configfile.settings.bed_mesh.speed) * 60 %} @@ -61,7 +58,7 @@ gcode: {% set config = printer["gcode_macro _Z_TRAMMING_SETTINGS"] %} {% set probe = printer.configfile.settings.probe %} {% set tolerance = config.tolerance | default(probe.samples_tolerance * 2)%} - {% set screw_lead = config.screw_lead %} + {% set screw_lead = printer.configfile.settings.stepper_z.rotation_distance | float %} {% set lift_direction = config.lift_direction | default("CW") | upper %} {% if not lift_direction in ["CW", "CCW"] %} diff --git a/macros/z_tramming_settings.cfg b/macros/z_tramming_settings.cfg index fcf2408..bacaa76 100644 --- a/macros/z_tramming_settings.cfg +++ b/macros/z_tramming_settings.cfg @@ -1,6 +1,5 @@ # This macro contains the configuration variables for the Z Tramming macro [gcode_macro _Z_TRAMMING_SETTINGS] -# variable_screw_lead: 4 # Required! The lead of Z lead screws in mm. This is the distance the Z axis moves for one full rotation of the lead screw. It is calculated by measuring the pitch and counting the number of starts/threads. # variable_tolerance: 0.04 # Defaults to double the probe.samples_tolerance # variable_y_position: 51 # Defaults to probe at the center of bed # variable_left: 0 # Defaults to minmum position accounting for probe offset @@ -9,12 +8,3 @@ # variable_lift_direction: 'CW' # The direction to turn a lead screw to lift the bed. Defaults to CW. Either CW or CCW gcode: -# This is an example for a Sovol SV06 -# [gcode_macro _Z_TRAMMING_SETTINGS] -# variable_screw_lead: 4 -# gcode: - -# This is an example for a Sovol SV06 Plus -# [gcode_macro _Z_TRAMMING_SETTINGS] -# variable_screw_lead: 4 -# gcode: