Marco Mayer / Mbed OS Queue
Revision:
2:c7897a3f5f11
Parent:
1:b36bbc1c6d27
diff -r b36bbc1c6d27 -r c7897a3f5f11 MPU9250.h
--- a/MPU9250.h	Sat Apr 11 08:15:48 2020 +0000
+++ b/MPU9250.h	Wed Apr 22 11:50:00 2020 +0000
@@ -181,14 +181,9 @@
   float az;
 }accData_t;
 
-
 class MPU9250 {
-
-
-public:
-    //------------------------------------------------------------------------------
-    // Function prototypes
-
+    
+private:
     void writeByte(uint8_t address, uint8_t subAddress, uint8_t data);
 
     char readByte(uint8_t address, uint8_t subAddress);
@@ -220,16 +215,25 @@
     void MPU9250SelfTest(float * destination);
 
     void MadgwickQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz);
-
-    void MahonyQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz);
-
-    void velocityUpdate(float ax, float ay, float az);
     
     void readIMU();
     
     void imuSetup();
+
+    Serial* pc;
     
-    accData_t getVelocityFromIMU();
+public:
+    //--------------------------------------------------------------------------
+    // Constructor
+    MPU9250(Serial* serialPtr);
+    
+    //--------------------------------------------------------------------------
+    // Only functions that are needed to get values from IMU
+    float getVBuffer();
+    
+    float getV();
+    
+    float vx_old;
 };
 
 #endif
\ No newline at end of file