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.
Revision 3:3332f633d674, committed 2017-10-22
- Comitter:
- Generic
- Date:
- Sun Oct 22 10:27:18 2017 +0000
- Parent:
- 2:c0e11aaa32e7
- Commit message:
- Fixed pwm calculation
Changed in this revision
DualMotorController.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c0e11aaa32e7 -r 3332f633d674 DualMotorController.cpp --- a/DualMotorController.cpp Sun Oct 22 09:18:19 2017 +0000 +++ b/DualMotorController.cpp Sun Oct 22 10:27:18 2017 +0000 @@ -25,7 +25,7 @@ _dirL1.write(1); } - _pwmL.write(speed); + _pwmL.write(speed/100.0f); } void DualMotorController::SetRight(float speed, bool forward) { @@ -37,5 +37,5 @@ _dirR1.write(1); } - _pwmR.write(speed); + _pwmR.write(speed/100.0f); } \ No newline at end of file