mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-07 05:54:05 -06:00
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>
This commit is contained in:
parent
6d7c03365a
commit
189188e3ca
5 changed files with 55 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue