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: src/motor.cpp
- Revision:
- 53:978b7fa74080
- Parent:
- 50:510ce69c2a10
--- a/src/motor.cpp Mon Dec 02 00:00:01 2013 +0000
+++ b/src/motor.cpp Mon Dec 02 05:16:26 2013 +0000
@@ -10,9 +10,11 @@
pos=0;
- kp=3;
+ kp=4;
kd=0.04;
+ dAngle=0;
+
pwmOut.period_us(100);
}
@@ -21,7 +23,7 @@
}
void Motor::calibAngle(float ang){
- encoder.calibPulse((int)ang*1200/6.283);
+ encoder.calibPulse((int)(ang*1200/6.283));
dAngle=ang;
}
