Modified phase table in stepper.cpp to enable stepping a bipolar motor using a twin H-bridge driver.
Fork of stepper by
Corrected single-stepping, now walking up or down just one phase table. Compile-time options for driving bipolar motor in any of single-phase, two-phase, or half-stepping. Coils remain engaged at end of specifed movement command - de-energize coils by issuing a motor.move(0) while already stopped.
Diff: stepper.cpp
- Revision:
- 6:ee6c96064559
- Parent:
- 5:f2bbcd06019e
- Child:
- 7:9fc4b1be489c
--- a/stepper.cpp Mon Dec 22 21:15:55 2014 +0000
+++ b/stepper.cpp Mon Dec 22 21:49:05 2014 +0000
@@ -64,7 +64,7 @@
steps = -steps;
}
// test for +ve, don't flip direction for stop command steps==0
- if (steps > 0){
+ else if (steps > 0){
inf.direction = D_CW;
}
inf.total_step = steps;
