aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-03-20 20:02:27 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-04-02 21:53:13 -0400
commitbedec55154771d5b02075c25be1a6d1f4bf91a07 (patch)
tree4f6ffb5ef1e422be6a2a3aab182e23c90ba0a6ba /klippy
parent239f8e59e0340a87ffa82ad80968fa06ea87bc3d (diff)
downloadkutter-bedec55154771d5b02075c25be1a6d1f4bf91a07.tar.gz
kutter-bedec55154771d5b02075c25be1a6d1f4bf91a07.tar.xz
kutter-bedec55154771d5b02075c25be1a6d1f4bf91a07.zip
motion_report: Don't negate step_distance on steppers with inverted dir pin
When querying the stepper motion queue, the resulting "interval", "count", and "add" are already normalized to the correct direction. That is, the "count" field will be positive if moving in a positive axis direction and negative if moving in the reverse direction. So, negating the step_distance field just complicates the readers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/extras/motion_report.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/klippy/extras/motion_report.py b/klippy/extras/motion_report.py
index 25c1d5e6..c142fb39 100644
--- a/klippy/extras/motion_report.py
+++ b/klippy/extras/motion_report.py
@@ -56,8 +56,6 @@ 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.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,
"start_mcu_position": mcu_pos, "step_distance": step_dist,