Speed sensor for tasdevelop
Dependencies: BLE_API MMA8451Q_ss mbed
Fork of FRDM_MMA8451Q by
Diff: main.cpp
- Revision:
- 6:fbce7ee68c07
- Parent:
- 5:973da26ee266
--- 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);