ec
Fork of EC by
Diff: SpeedController.cpp
- Revision:
- 20:3ed9cd8e8676
- Parent:
- 19:36406ea61728
- Child:
- 21:211633c6e454
- Child:
- 22:b2a03aa754d9
diff -r 36406ea61728 -r 3ed9cd8e8676 SpeedController.cpp --- a/SpeedController.cpp Fri Apr 14 05:24:08 2017 +0000 +++ b/SpeedController.cpp Fri Apr 14 06:09:01 2017 +0000 @@ -113,7 +113,7 @@ diff_old=diff; 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; + if((duty>=0)&&(duty<0.95)) out+=out_duty; duty=0.0001*out/*+target_RPM/C*/; turnF(duty); }