changes to motor library

Dependents:   pid-car-example

Fork of motor by Lawrence Harlow

Branch:
motorupdate
Revision:
47:bafec50148b6
Parent:
45:fec835dfd43a
Child:
48:2e39f9fca850
diff -r 2ba3e590f46a -r bafec50148b6 motor.cpp
--- a/motor.cpp	Thu Apr 27 15:58:06 2017 +0000
+++ b/motor.cpp	Thu Apr 27 15:59:40 2017 +0000
@@ -108,7 +108,7 @@
 // This is a function which works off of the duty cycle. NO SENSOR REQUIREMENT
 
 // this function works off the actual value rather than the change in angle. therefore need to have a variabe which stores where the value is.
-void dutyCycleCorner( float speed, float theta)
+void dutyCycleCorner( float speed, float theta,float tuner)
 {
         bool leftOrRight;
         // sets if the car is going left or right
@@ -119,7 +119,7 @@
             
         }
     //calculates the difference in 
-        float deltaW = ((0.1f*tan((theta/0.02222f)* (3.14f / 180.0f)))/0.2f)*speed;
+        float deltaW = (((0.1f*tan((theta/0.02222f)* (3.14f / 180.0f)))/0.2f)*speed)*tuner;
         
         //TFC_SetMotorPWM(w2,w1);
         // this sets the speeds of each motor (outer wheel goes faster than inner wheel)