DP / Mbed 2 deprecated RCControlOOPWithThrottle

Dependencies:   mbed

Fork of RCControlOOP by DP

Revision:
1:e694ee3b4a7f
Parent:
0:78e2af20cbf3
Child:
2:e9042e88abf1
--- a/Mousr.cpp	Mon Sep 08 11:32:04 2014 +0000
+++ b/Mousr.cpp	Sun Sep 21 14:43:47 2014 +0000
@@ -2,14 +2,14 @@
 
 Mousr::Mousr() : m1a(p24), m1b(p23), m2a(p22), m2b(p21)
 {           
-    straightSpeed = 1.0;
-    rotateSlowSpeed = 0.3;
-    rotateSpeed = 0.5;
-    rotateFastSpeed = 0.8;
-    flipStraightSpeed = 0.6;
-    flipStraightWait = 0.6;
-    flipRotateSpeed = 0.5;
-    flipRotateWait = 0.5;
+    straightSpeed     = 0.7;
+    rotateSlowSpeed   = 0.1;
+    rotateSpeed       = 0.3;
+    rotateFastSpeed   = 0.9;
+    flipStraightSpeed = 0.9;
+    flipStraightWait  = 0.6;
+    flipRotateSpeed   = 0.9;
+    flipRotateWait    = 0.2;
 }
 
 void Mousr::stop()
@@ -43,6 +43,7 @@
     wait(flipStraightWait);
     left(flipRotateSpeed);
     wait(flipRotateWait);
+    stop();
 }
 
 void Mousr::flipRight()
@@ -51,6 +52,7 @@
     wait(flipStraightWait);
     right(flipRotateSpeed);
     wait(flipRotateWait);
+    stop();
 }
 
 // GETTER FUNCTIONS
@@ -61,15 +63,15 @@
 
 float Mousr::getRotateSlowSpeed()
 {
-    return straightSpeed;
+    return rotateSlowSpeed;
 }
 
 float Mousr::getRotateSpeed()
 {
-    return straightSpeed;
+    return rotateSpeed;
 }
 
 float Mousr::getRotateFastSpeed()
 {
-    return straightSpeed;
+    return rotateFastSpeed;
 }
\ No newline at end of file