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 <kevin@koconnor.net>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user