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.
Dependencies: mbed ros_lib_kinetic hallsensor_software_decoder
Revision 8:82efd1be89ee, committed 2019-03-31
- Comitter:
- bobolee1239
- Date:
- Sun Mar 31 12:28:42 2019 +0000
- Parent:
- 7:a8bc36d27ad4
- Commit message:
- fixed unit tranformation bug
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Mar 29 05:59:59 2019 +0000
+++ b/main.cpp Sun Mar 31 12:28:42 2019 +0000
@@ -115,8 +115,8 @@
void controllerTISR() {
// 60.0 / 2pi = 9.549296586
- controller1.refRPM = (car.refV/car.r - car.L*car.refW/2.0/car.r) / 9.549296586;
- controller2.refRPM = (car.refV/car.r + car.L*car.refW/2.0/car.r) / 9.549296586;
+ controller1.refRPM = (car.refV - car.L*car.refW/2.0) * 9.549296586 / car.r;
+ controller2.refRPM = (car.refV + car.L*car.refW/2.0) * 9.549296586 / car.r;
// pc.printf("%.2f, %.2f", controller1.refRPM, controller2.refRPM);