changes to motor library

Dependents:   pid-car-example

Fork of motor by Lawrence Harlow

Branch:
motorupdate
Revision:
45:fec835dfd43a
Parent:
44:b46efc310b83
Child:
47:bafec50148b6
--- a/motor.cpp	Thu Apr 27 11:51:44 2017 +0000
+++ b/motor.cpp	Thu Apr 27 15:50:28 2017 +0000
@@ -24,7 +24,7 @@
 //----------------------------------------------This is for Motor Set up------------------------------------------------------------
 //----------------------------------------------------------------------------------------------------------------------------------  
 
- void   runMotor() // This simply sets the PWM and turns the motors off whent he button is pushed
+ void   runMotor() // This simply sets the PWM and turns the motors off when the button is pushed
     {
         
         
@@ -146,18 +146,18 @@
     if(theta<0)
         {
             leftOrRight=true;
-            theta=theta*-1;   
+            theta = theta*-1;   
             
         }
         
     //this limits the ED to stop it spinning out at high speeds.
 
 
-    if(theta>0.4)
+    if(theta>0.35)
     {
 
-     theta = 0.4;   
-     //speed = speed- corner limiter;
+     theta = 0.35;   
+     //speed = speed- cornerlimiter;
         
     }
     
@@ -172,7 +172,7 @@
     float deltaW = (0.1f/(2*0.2f*angle))*speed;
     // 
     if(leftOrRight){
-          w1= speed+ (deltaW * tune);
+          w1= speed + (deltaW * tune);
           w2= speed -(deltaW * tune);