ddd

Fork of stepper by Biy Bill

Files at this revision

API Documentation at this revision

Comitter:
glintligo
Date:
Sun Jun 03 10:17:37 2018 +0000
Parent:
1:88f743f3e7a7
Commit message:
gdfs;

Changed in this revision

a4988.cpp Show annotated file Show diff for this revision Revisions of this file
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 )
         {