ec
Fork of EC by
Diff: SpeedController.cpp
- Revision:
- 24:8ac46a6d2ac4
- Parent:
- 23:ee41ae658144
- Child:
- 26:45a53e3c81b1
--- a/SpeedController.cpp Sat Apr 15 11:05:49 2017 +0000 +++ b/SpeedController.cpp Tue Apr 18 04:12:19 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.04)out_duty=0.04; + if(out_duty<-0.04)out_duty=-0.04; if((duty>=0)&&(duty<0.95)) out+=out_duty; duty=0.0001*out/*+target_RPM/C*/; if(duty>=0.95) {