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:
- 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);