ec
Fork of EC by
Diff: SpeedController.cpp
- Revision:
- 22:b2a03aa754d9
- Parent:
- 20:3ed9cd8e8676
--- a/SpeedController.cpp Fri Apr 14 06:09:01 2017 +0000 +++ b/SpeedController.cpp Sat Apr 15 07:53:16 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.02)out_duty=0.02; - if(out_duty<-0.02)out_duty=-0.02; + if(out_duty>0.015)out_duty=0.015; + if(out_duty<-0.015)out_duty=-0.015; if((duty>=0)&&(duty<0.95)) out+=out_duty; duty=0.0001*out/*+target_RPM/C*/; turnF(duty);