diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2022-01-29 14:13:26 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2022-02-10 13:24:21 -0500 |
commit | 189188e3ca3e40d8272fb4ad48316e329f8ec453 (patch) | |
tree | 6cb261ae94676f18a0170d4442f81ac94f3e5831 /klippy/extras/endstop_phase.py | |
parent | 6d7c03365ad13c4661675aaccd0a3dc5be544493 (diff) | |
download | kutter-189188e3ca3e40d8272fb4ad48316e329f8ec453.tar.gz kutter-189188e3ca3e40d8272fb4ad48316e329f8ec453.tar.xz kutter-189188e3ca3e40d8272fb4ad48316e329f8ec453.zip |
extruder: Add a SET_EXTRUDER_ROTATION_DISTANCE command
Support altering the extruder distance using the higher-level
rotation_distance. This is in preparation for removal of the
SET_EXTRUDER_STEP_DISTANCE command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/endstop_phase.py')
-rw-r--r-- | klippy/extras/endstop_phase.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py index 254184db..bd34ddbe 100644 --- a/klippy/extras/endstop_phase.py +++ b/klippy/extras/endstop_phase.py @@ -54,7 +54,8 @@ class EndstopPhase: self.name = config.get_name().split()[1] # Obtain step_distance and microsteps from stepper config section sconfig = config.getsection(self.name) - self.step_dist = stepper.parse_step_distance(sconfig) + rotation_dist, steps_per_rotation = stepper.parse_step_distance(sconfig) + self.step_dist = rotation_dist / steps_per_rotation self.phases = sconfig.getint("microsteps", note_valid=False) * 4 self.phase_calc = PhaseCalc(self.printer, self.name, self.phases) # Register event handlers |