changes to motor library
Fork of motor by
Diff: motor.cpp
- Branch:
- motorupdate
- Revision:
- 25:255d169a45e1
- Parent:
- 24:15c6bbdbb0e4
- Child:
- 26:c74e70a745ec
--- a/motor.cpp Wed Jan 11 10:53:26 2017 +0000 +++ b/motor.cpp Wed Jan 11 11:06:18 2017 +0000 @@ -153,13 +153,21 @@ } float deltaW = ((0.1f*tan((theta/0.02222f)* (3.14f / 180.0f)))/0.2f)*speed; + //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(leftOrRight){ w1= speed+ deltaW * tune; w2= speed -deltaW * tune; + //w1=vout; + //w2=vin; + } else{ w1= speed- deltaW*tune; w2= speed +deltaW*tune; + //w1=vin; + //w2=vout; }