PlayBack

Dependencies:   TPixy-Interface

Fork of ManualControlFinal by ECE4333 - 2018 - Ahmed & Brandon

Revision:
6:e7ce340fe91e
Parent:
4:417e475239c7
Child:
8:a0890fa79084
--- a/ui.cpp	Fri Feb 09 18:37:11 2018 +0000
+++ b/ui.cpp	Sat Feb 10 19:35:21 2018 +0000
@@ -166,19 +166,19 @@
         }
         else if (x=='i')
         {
-            Ki = Ki + 0.001;
+            Ki = Ki + 0.01;
         }
         else if (x=='k')
         {
-            Ki = Ki - 0.001;
+            Ki = Ki - 0.01;
         }
         else if (x=='o')
         {
-            Kp = Kp + 0.01;
+            Kp = Kp + 0.1;
         }
         else if (x=='l')
         {
-            Kp = Kp - 0.01;    
+            Kp = Kp - 0.1;    
         }
         
         // error wrong input
@@ -191,7 +191,7 @@
     
     //bluetooth.printf("\r\nPos: %d, dP: %d, dT: %d, Kp: %f, Ki: %f, vel: %d, e: %d", position, dPosition, dTime, Kp, Ki, vel, e);
     
-    bluetooth.printf("\r\ndP: %d, vel: %d, Kp: %f, Ki: %f, e: %d, xState: %d", dPosition, vel, Kp, Ki, e, xState);
+    bluetooth.printf("\r\ndP: %d, vel: %d, (Kp*e) Kp: %f, (Ki*xState) Ki: %f, e: %d, xState: %d, u: %d", dPosition, vel, Kp, Ki, e, xState , u);
     
     //bluetooth.printf("\r\ne: %d, Pos: %d, dP: %d, xState: %d, u: %d, dT: %d", e, position, dPosition, xState, u, dTime);