changes to motor library
Fork of motor by
Diff: motor.cpp
- Branch:
- motorupdate
- Revision:
- 30:3d6bb5f736a5
- Parent:
- 29:d3efef939c18
- Child:
- 31:51783b84a859
- Child:
- 32:bbdd1cc1d6e2
- Child:
- 34:7e59011ca978
diff -r d3efef939c18 -r 3d6bb5f736a5 motor.cpp --- a/motor.cpp Wed Jan 11 19:30:03 2017 +0000 +++ b/motor.cpp Wed Jan 11 20:01:48 2017 +0000 @@ -181,8 +181,8 @@ else{ //calulates the speed in eack wheel. - 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)); + 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=vout;