From afecf7ce36d4d712413d8c90ac055baa51cb26bd Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 8 Nov 2016 10:39:32 -0500 Subject: stepper: Default to a high direction pin meaning positive direction Invert the default meaning of the stepper direction pin. Instead of treating a low value as position motion, treat a high value as positive motion. This matches what other firmwares do, and it matches what common stepper motor drivers document. Signed-off-by: Kevin O'Connor --- klippy/cartesian.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/cartesian.py') diff --git a/klippy/cartesian.py b/klippy/cartesian.py index 16db25d2..0a5f7961 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -105,9 +105,9 @@ class CartKinematics: self.stepper_pos[i] = new_step_pos steps = move.axes_d[i] * inv_step_dist step_offset = step_pos - move.start_pos[i] * inv_step_dist + 0.5 - sdir = 0 + sdir = 1 if steps < 0: - sdir = 1 + sdir = 0 steps = -steps step_offset = 1. - step_offset mcu_time, so = self.steppers[i].prep_move(move_time, sdir) -- cgit v1.2.3-70-g09d2