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: Motor.cpp
- Revision:
- 2:11b3ef6b937d
- Parent:
- 1:c75b234558af
- Child:
- 3:143494304b66
--- a/Motor.cpp Tue Sep 07 11:21:42 2010 +0000
+++ b/Motor.cpp Sun Oct 29 06:04:49 2017 +0000
@@ -35,8 +35,8 @@
}
void Motor::speed(float speed) {
- _fwd = (speed > 0.0);
- _rev = (speed < 0.0);
+ _fwd = (speed > (float)0.0);
+ _rev = (speed < (float)0.0);
_pwm = abs(speed);
}