Speed sensor for tasdevelop
Dependencies: BLE_API MMA8451Q_ss mbed
Fork of FRDM_MMA8451Q by
Revision 6:fbce7ee68c07, committed 2015-03-24
- Comitter:
- tasdevelop
- Date:
- Tue Mar 24 02:49:27 2015 +0000
- Parent:
- 5:973da26ee266
- Commit message:
- correct Floating-point calculation.
Changed in this revision
MMA8451Q_ss.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MMA8451Q_ss.lib Thu Mar 19 02:34:45 2015 +0000 +++ b/MMA8451Q_ss.lib Tue Mar 24 02:49:27 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/suzukimitsuhiro/code/test/#6edc31ecae9e +http://developer.mbed.org/users/tasdevelop/code/MMA8451Q_ss/#6edc31ecae9e
--- a/main.cpp Thu Mar 19 02:34:45 2015 +0000 +++ b/main.cpp Tue Mar 24 02:49:27 2015 +0000 @@ -105,7 +105,7 @@ } f=0; velocity = dxyz*9.8; - velocity *= 3600/1000/10; + velocity *= (3600.0f/1000.0f/10.0f); oxyz = xyz; pc.printf("X: %7.2f, Y: %7.2f, Z: %7.2f v:%7.2f\r\n", x, y, z, velocity);