Library containing Crazyflie 2.0 sensors drivers: - LPS25H (barometer) - MPU9250 (IMU) - PMW3901 (optical flow) - VL53L0X (range)

Dependents:   Drones-Controlador controladoatitude_cteste Drone_Controlador_Atitude optical_test

Revision:
5:1ef8b91a0318
Parent:
3:2f2b8e863991
diff -r d55264b2cad5 -r 1ef8b91a0318 MPU9250/MPU9250.cpp
--- a/MPU9250/MPU9250.cpp	Thu Apr 19 19:44:07 2018 +0000
+++ b/MPU9250/MPU9250.cpp	Fri May 04 23:03:00 2018 +0000
@@ -47,16 +47,16 @@
     switch (a_scale)
     {
         case ACCEL_SCALE_2G:
-            a_res = (2.0*GRAVITY)/32768.0;
+            a_res = (2.0f*GRAVITY)/32768.0f;
             break;
         case ACCEL_SCALE_4G:
-            a_res = (4.0*GRAVITY)/32768.0;
+            a_res = (4.0f*GRAVITY)/32768.0f;
             break;
         case ACCEL_SCALE_8G:
-            a_res = (8.0*GRAVITY)/32768.0;
+            a_res = (8.0f*GRAVITY)/32768.0f;
             break;
         case ACCEL_SCALE_16G:
-            a_res = (16.0*GRAVITY)/32768.0;
+            a_res = (16.0f*GRAVITY)/32768.0f;
             break;
     }
 }
@@ -76,16 +76,16 @@
     switch (g_scale)
     {
         case GYRO_SCALE_250DPS:
-            g_res = (250.0*(PI/180.0))/32768.0;
+            g_res = (250.0f*(PI/180.0f))/32768.0f;
             break;
         case GYRO_SCALE_500DPS:
-            g_res = (500.0*(PI/180.0))/32768.0;
+            g_res = (500.0f*(PI/180.0f))/32768.0f;
             break;
         case GYRO_SCALE_1000DPS:
-            g_res = (1000.0*(PI/180))/32768.0;
+            g_res = (1000.0f*(PI/180.0f))/32768.0f;
             break;
         case GYRO_SCALE_2000DPS:
-            g_res = (2000.0*(PI/180.0))/32768.0;
+            g_res = (2000.0f*(PI/180.0f))/32768.0f;
             break;
     }
 }