changes to motor library
Fork of motor by
Diff: motor.cpp
- Branch:
- motorupdate
- Revision:
- 20:ca87a36c7688
- Parent:
- 19:69c142d81437
- Child:
- 21:aaa482dad274
--- a/motor.cpp Wed Nov 30 10:50:22 2016 +0000 +++ b/motor.cpp Wed Nov 30 11:10:07 2016 +0000 @@ -158,8 +158,14 @@ float deltaW = ((0.1f*tan((theta/0.02222f)* (3.14f / 180.0f)))/0.2f)*speed; - w1= speed+ deltaW; - w2= speed -deltaW; + if(leftOrRight){ + w1= speed+ deltaW; + w2= speed -deltaW; + else{ + w1= speed- deltaW; + w2= speed +deltaW; + } + return;