PlayBack

Dependencies:   TPixy-Interface

Fork of ManualControlFinal by ECE4333 - 2018 - Ahmed & Brandon

Revision:
20:9118203f7c9c
Parent:
19:4fbffc755ed7
Child:
22:c09acff62e6a
--- a/ui.cpp	Fri Mar 23 19:03:35 2018 +0000
+++ b/ui.cpp	Fri Mar 23 22:10:38 2018 +0000
@@ -22,6 +22,7 @@
 Mutex setpointR_mutex;
 Mutex setpointL_mutex;
 
+
 // speed
 int setpointR = 0;
 int setpointL = 0;
@@ -35,7 +36,7 @@
 
 
 /******************************************************************************
-                           User interface 3 Camera
+                           User interface 3 Object Follower
 ******************************************************************************/
 void consoleUIcamera(void){
 
@@ -105,7 +106,7 @@
 }
 
 /******************************************************************************
-                           User interface 1
+                           User interface 1 - PI tunning
 ******************************************************************************/
 /*
 void consoleUI(void)
@@ -163,7 +164,7 @@
 }
 */
 /******************************************************************************
-                           User interface 2
+                           User interface 2 - old
 ******************************************************************************/
 
 void consoleUIold(void)
@@ -258,7 +259,7 @@
 }
 
 /******************************************************************************
-                           User interface 3 - manual control
+                           User interface 3 - Manual Control
 ******************************************************************************/
 
 void consoleUI(void)
@@ -280,7 +281,7 @@
         // by incrementing u
         else if(x == 'w') {
             mutexSetpoint.lock();
-            Setpoint = -25;
+            Setpoint = -40;
             mutexSetpoint.unlock();
         
         }
@@ -289,7 +290,7 @@
         // by decrementing u
         else if(x == 's') {
             mutexSetpoint.lock();
-            Setpoint = 25;
+            Setpoint = 40;
             mutexSetpoint.unlock();
         
         }
@@ -298,13 +299,13 @@
         else if (x=='a')
         {
             mutexSetpoint.lock();
-            SteeringError = 75;
+            SteeringError = 80;
             mutexSetpoint.unlock();
         }
         else if (x=='d')
         {
             mutexSetpoint.lock();
-            SteeringError = -75;
+            SteeringError = -80;
             mutexSetpoint.unlock();
         }        
         // error wrong input
@@ -316,9 +317,6 @@
         // If no key is pressed stop the robot. 
         Setpoint = 0;
         SteeringError = 0;
-           
     }
     
-    //bluetooth.printf("\r\nPos: %d, dP: %d, dT: %d, Kp: %f, Ki: %f, vel: %d, e: %d", position, dPosition, dTime, Kp, Ki, vel, e);
-    
 }