2024-09-11 12:19:10 +00:00
|
|
|
|
|
|
|
#ifndef IMU_h
|
|
|
|
#define IMU_h
|
|
|
|
|
|
|
|
#include <MPU6050_tockn.h>
|
|
|
|
|
|
|
|
#define UPDATE_IMU_INTERVAL 1000/50
|
|
|
|
|
|
|
|
#define IMU_AC 0.1f //default 0.02f
|
2024-09-11 15:15:34 +00:00
|
|
|
#define IMU_GC 0.90f //default 0.98f. //AC + GC must equal 1.0
|
2024-09-11 12:19:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void initIMU();
|
|
|
|
void initIMU(float x,float y,float z);
|
|
|
|
void loopIMU(unsigned long millis);
|
|
|
|
bool isBellyUp();
|
|
|
|
|
|
|
|
float getAngleX();
|
|
|
|
float getAngleY();
|
|
|
|
float getAngleZ();
|
|
|
|
|
|
|
|
float getAccX();
|
|
|
|
float getAccY();
|
|
|
|
float getAccZ();
|
|
|
|
|
2024-09-12 14:59:47 +00:00
|
|
|
float getMaxAccX();
|
|
|
|
float getMaxAccY();
|
|
|
|
float getMaxAccZ();
|
|
|
|
void resetMaxAcc();
|
|
|
|
|
2024-09-12 09:23:52 +00:00
|
|
|
float getGyroAngleX();
|
|
|
|
float getGyroAngleY();
|
|
|
|
float getGyroAngleZ();
|
|
|
|
|
2024-09-11 12:19:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|