ec

Dependents:   F3RC

Fork of EC by ROBOSTEP_LIBRARY

Revision:
19:36406ea61728
Parent:
18:31058ca8fc8a
Child:
20:3ed9cd8e8676
--- a/SpeedController.cpp	Thu Apr 13 02:39:23 2017 +0000
+++ b/SpeedController.cpp	Fri Apr 14 05:24:08 2017 +0000
@@ -111,8 +111,8 @@
     integral+=diff;
     out_duty=0.01*(Kv_p*diff+Kv_d*(diff-diff_old)+Kv_i*integral);
     diff_old=diff;
-    if(out_duty>0.01)out_duty=0.01;
-    if(out_duty<-0.01)out_duty=-0.01;
+    if(out_duty>0.02)out_duty=0.02;
+    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*/;
     turnF(duty);