changes to motor library

Dependents:   pid-car-example

Fork of motor by Lawrence Harlow

Branch:
motorupdate
Revision:
26:c74e70a745ec
Parent:
25:255d169a45e1
Child:
27:98aecf1889ed
--- a/motor.cpp	Wed Jan 11 11:06:18 2017 +0000
+++ b/motor.cpp	Wed Jan 11 11:07:41 2017 +0000
@@ -155,7 +155,7 @@
     
     //float vin = speed(2 - 0.1/tan((theta/0.022222)*(3.14f / 180.0f));
     //float vout = speed(2 + 0.1/tan((theta/0.022222)*(3.14f / 180.0f));
-
+    if(true){
     if(leftOrRight){
           w1= speed+ deltaW * tune;
           w2= speed -deltaW * tune;
@@ -169,9 +169,21 @@
             //w1=vin;
             //w2=vout;
         }
-    
+    }
+    else{
+         if(leftOrRight){
+          
+          w1=vout;
+          w2=vin;
+          
+          }
+        else{
+               
+                w1=vin;
+                w2=vout;
+            }
         
-        
+      }  
     return;   
 }