ddd
Fork of stepper by
Diff: a4988.cpp
- Revision:
- 2:e9699816ff84
- Parent:
- 1:88f743f3e7a7
diff -r 88f743f3e7a7 -r e9699816ff84 a4988.cpp --- a/a4988.cpp Fri May 11 06:05:21 2018 +0000 +++ b/a4988.cpp Sun Jun 03 10:17:37 2018 +0000 @@ -1,5 +1,6 @@ #include "a4988.h" #include "mbed.h" +extern int stepok; Stepper::Stepper(PinName _en, PinName _stepPin, PinName _direction):en(_en), stepPin(_stepPin), direction(_direction) @@ -31,8 +32,9 @@ void Stepper::step_control() { if(remain == 0) - { - return; + { + stepok = 1; + return ; } if(remain < 0 ) {