extruder: Add support for reversing the direction of extruder stepper movement

Extend SET_EXTRUDER_ROTATION_DISTANCE to support reversing the
direction of extruder movement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-01-29 19:13:31 -05:00
parent 189188e3ca
commit 9ec9742484
9 changed files with 60 additions and 19 deletions

View file

@ -139,7 +139,7 @@ class DumpStepper:
mcu_pos = first.start_position
start_position = self.mcu_stepper.mcu_to_commanded_position(mcu_pos)
step_dist = self.mcu_stepper.get_step_dist()
if self.mcu_stepper.is_dir_inverted():
if self.mcu_stepper.get_dir_inverted()[0]:
step_dist = -step_dist
d = [(s.interval, s.step_count, s.add) for s in data]
return {"data": d, "start_position": start_position,