Dependencies: BNO055_fusion_tom FastPWM mbed
Fork of NucleoCube1 by
Revision 27:c3ca97f1db60, committed 2017-04-18
- Comitter:
- tomras12
- Date:
- Tue Apr 18 03:15:07 2017 +0000
- Parent:
- 26:f2bb916262c9
- Commit message:
- Fixed hall sensor analog read
Changed in this revision
cube.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/cube.cpp Thu Apr 13 23:17:41 2017 +0000 +++ b/cube.cpp Tue Apr 18 03:15:07 2017 +0000 @@ -39,7 +39,7 @@ { // Converts and read the analog input value (value from 0.0 to 1.0): double wv = c->hall->read(); - wv = (wv - 2.0) * 5000.0; // Scale the velocity to rad/s + wv = (wv - 1.65) * 5000.0 / 1.65; // Scale the velocity to rad/s double bt = (*(c->angle) - c->eqAngle);