An eCompass library only for use on FPU enabled platforms like the K64F
Dependents: K64F_eCompass_LCD rtos_compass K64F_eCompass GPS_6Axis_DataLogger_SD_UDP ... more
Fork of eCompass_Lib by
Diff: eCompass_Lib.cpp
- Revision:
- 4:3842f7654e34
- Parent:
- 3:98d426530167
- Child:
- 5:aeaceeb90d58
diff -r 98d426530167 -r 3842f7654e34 eCompass_Lib.cpp --- a/eCompass_Lib.cpp Sun Apr 13 21:23:57 2014 +0000 +++ b/eCompass_Lib.cpp Mon Apr 14 02:02:31 2014 +0000 @@ -43,14 +43,14 @@ axis6.fmz = (float) mag_raw[2]; // // Accelerometer data converted to Gs - axis6.fGax = ((float) acc_raw[0]) / 4096.0; - axis6.fGay = ((float) acc_raw[1]) / 4096.0; - axis6.fGaz = ((float) acc_raw[2]) / 4096.0; + axis6.fGax = ((float) acc_raw[0]) / 4096.0f; + axis6.fGay = ((float) acc_raw[1]) / 4096.0f; + axis6.fGaz = ((float) acc_raw[2]) / 4096.0f; // // Magnetometer data converted to microteslas - axis6.fUTmx = ((float) mag_raw[0]) / 10.0; - axis6.fUTmy = ((float) mag_raw[1]) / 10.0; - axis6.fUTmz = ((float) mag_raw[2]) / 10.0; + axis6.fUTmx = ((float) mag_raw[0]) / 10.0f; + axis6.fUTmy = ((float) mag_raw[1]) / 10.0f; + axis6.fUTmz = ((float) mag_raw[2]) / 10.0f; //printf("r"); if(!cdebug) run_eCompass(); }