Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: harurobo1006 harurobo_1026
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);