ManualControl

Dependencies:   TPixy-Interface

Fork of MbedOS_Robot_Team by ECE4333 - 2018 - Ahmed & Brandon

Revision:
28:00b21c648d31
Parent:
22:c09acff62e6a
diff -r c09acff62e6a -r 00b21c648d31 ui.cpp
--- a/ui.cpp	Fri Mar 23 22:42:41 2018 +0000
+++ b/ui.cpp	Fri Apr 06 20:09:32 2018 +0000
@@ -56,7 +56,7 @@
         // by incrementing u
         else if(x == 'w') {
             mutexSetpoint.lock();
-            Setpoint = -40;
+            Setpoint -= 10;
             mutexSetpoint.unlock();
         
         }
@@ -65,7 +65,7 @@
         // by decrementing u
         else if(x == 's') {
             mutexSetpoint.lock();
-            Setpoint = 40;
+            Setpoint += 10;
             mutexSetpoint.unlock();
         
         }
@@ -74,13 +74,13 @@
         else if (x=='a')
         {
             mutexSetpoint.lock();
-            SteeringError = 80;
+            SteeringError += 10;
             mutexSetpoint.unlock();
         }
         else if (x=='d')
         {
             mutexSetpoint.lock();
-            SteeringError = -80;
+            SteeringError -= 10;
             mutexSetpoint.unlock();
         }        
         // error wrong input
@@ -90,8 +90,8 @@
     }
     else{
         // If no key is pressed stop the robot. 
-        Setpoint = 0;
-        SteeringError = 0;
+        //Setpoint = 0;
+        //SteeringError = 0;
     }
     
 }