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.
Diff: pid.cpp
- Revision:
- 8:1ce513eff545
- Parent:
- 6:95722ada4706
- Child:
- 10:332a4ad5911d
--- a/pid.cpp Fri Dec 04 05:31:17 2015 +0000 +++ b/pid.cpp Fri Dec 04 05:56:00 2015 +0000 @@ -27,6 +27,7 @@ #include "pid.h" + Timer timer; void ctrl::setKp(float num){ @@ -95,7 +96,7 @@ } -void ctrl::adjust(float xSpeed,float ySpeed,float L, float R){ +void ctrl::adjust(float xSpeed,float L, float R){ TErr=xSpeed-(L+R); @@ -104,7 +105,7 @@ } -void ctrl::updateErr(float *e){ +void ctrl::updateErr(float e){ setprevErr(error); error=e;