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.
Dependents: harurobo1006 harurobo_1026
Fork of EC by
Diff: SpeedController.cpp
- Revision:
- 7:87c135463de7
- Parent:
- 5:4abba4f54406
- Child:
- 9:a919aa92e65e
--- a/SpeedController.cpp Sat Nov 12 06:50:56 2016 +0000 +++ b/SpeedController.cpp Sat Nov 19 07:03:54 2016 +0000 @@ -76,8 +76,8 @@ old_speed=now_speed; wait(0.01); now_speed=getRPM(); - if(now_speed>old_speed) { - if(count>3) break; + if(now_speed<old_speed) { + if(count>1) break; else count++; } } @@ -93,8 +93,8 @@ old_speed=now_speed; wait(0.01); now_speed=getRPM(); - if(now_speed<old_speed) { - if(count>3) break; + if(now_speed>old_speed) { + if(count>1) break; else count++; } }