ec

Dependents:   F3RC

Fork of EC by ROBOSTEP_LIBRARY

Revision:
23:ee41ae658144
Parent:
21:211633c6e454
Child:
24:8ac46a6d2ac4
--- a/SpeedController.cpp	Sat Apr 15 07:47:18 2017 +0000
+++ b/SpeedController.cpp	Sat Apr 15 11:05:49 2017 +0000
@@ -115,7 +115,10 @@
     if(out_duty<-0.02)out_duty=-0.02;
     if((duty>=0)&&(duty<0.95)) out+=out_duty;
     duty=0.0001*out/*+target_RPM/C*/;
-    if(duty>=0.95) duty=0.94;
+    if(duty>=0.95) {
+        duty=0.94;
+        out=0.94/0.0001;
+    }
     turnF(duty);
 }