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:
14:e4d638ac83af
Parent:
8:930aa9d0f5ae
Child:
15:e07de535b86f
diff -r 7c993621bc1f -r e4d638ac83af PMW3901/PMW3901.cpp
--- a/PMW3901/PMW3901.cpp	Wed Sep 26 21:47:09 2018 +0000
+++ b/PMW3901/PMW3901.cpp	Thu Sep 27 17:57:28 2018 +0000
@@ -178,9 +178,9 @@
     // Reassemble the data (two 8 bit data into one 16 bit data)
     int16_t x_raw = (data[1] << 8 ) | data[0];
     int16_t y_raw = (data[3] << 8 ) | data[2];
-    // Convert to SI units [rad/s]
-    x = x_raw * 1.0f;
-    y = y_raw * 1.0f; 
+    // Convert to SI units [px]
+    x = -y_raw * 1.0f;
+    y = -x_raw * 1.0f; 
     
     // Deselect the device by seting chip select high
     cs = 1;