ec
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++; } }