Saved ~ Working on IMU
This commit is contained in:
32
IMU.hpp
32
IMU.hpp
@@ -9,6 +9,38 @@
|
|||||||
#define AUTOPILOT_SHARED_DATA_IMU_HPP_
|
#define AUTOPILOT_SHARED_DATA_IMU_HPP_
|
||||||
|
|
||||||
|
|
||||||
|
#include "stdint.h"
|
||||||
|
#include "stdbool.h"
|
||||||
|
|
||||||
|
namespace IMU {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct Data {
|
||||||
|
|
||||||
|
int16_t acc_x = 0;
|
||||||
|
int16_t acc_y = 0;
|
||||||
|
int16_t acc_z = 0;
|
||||||
|
|
||||||
|
int16_t gyr_x = 0;
|
||||||
|
int16_t gyr_y = 0;
|
||||||
|
int16_t gyr_z = 0;
|
||||||
|
|
||||||
|
int16_t mag_x = 0;
|
||||||
|
int16_t mag_y = 0;
|
||||||
|
int16_t mag_z = 0;
|
||||||
|
|
||||||
|
bool isCallibrating = false;
|
||||||
|
};
|
||||||
|
//IMU uses SPI 1
|
||||||
|
//MAG uses I2C
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} //namespace IMU
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user