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:
- 10:573cd4808d91
- Parent:
- 6:a9ab4e153009
--- a/Motor.cpp Thu May 21 06:33:47 2015 +0000 +++ b/Motor.cpp Sat Nov 21 04:19:12 2015 +0000 @@ -104,7 +104,7 @@ float delta_spd = target_spd - actual_spd; //if delta_spd large, brake this cycle. - if(delta_spd < -0.35){ + if(delta_spd < -0.35 || target_spd <= 0){ motor->write(0.0); *brake = 1; return;