changes to motor library

Dependents:   pid-car-example

Fork of motor by Lawrence Harlow

Branch:
motorupdate
Revision:
49:98fb0d816007
Parent:
48:2e39f9fca850
--- a/motor.cpp	Fri Apr 28 07:54:55 2017 +0000
+++ b/motor.cpp	Fri Apr 28 08:12:32 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,float tuner)
+void dutyCycleCorner( float speed, float theta,float tuner, float corner)
 {
         bool leftOrRight;
         // sets if the car is going left or right
@@ -121,7 +121,7 @@
         if(theta>0.3)
         {
             theta =0.3;
-            
+            speed = corner;
         }
     //calculates the difference in 
         float deltaW = (((0.1f*tan((theta/0.02222f)* (3.14f / 180.0f)))/0.2f)*speed)*tuner;