Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: MPU9250.h
- Revision:
- 2:c7897a3f5f11
- Parent:
- 1:b36bbc1c6d27
--- 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