-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsensorIMU.h
More file actions
44 lines (36 loc) · 845 Bytes
/
sensorIMU.h
File metadata and controls
44 lines (36 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _SENSOR_IMU_H
#define _SENSOR_IMU_H
#include "SensorQMI8658.hpp"
#include "kalman.h"
#include "sensorData.h"
//////////////////////////////////////////////////////////////////////
// Constants
//////////////////////////////////////////////////////////////////////
#ifndef SENSOR_SDA
#define SENSOR_SDA 42
#endif
#ifndef SENSOR_SCL
#define SENSOR_SCL 41
#endif
struct qmiData {
IMUdata acc;
IMUdata gyr;
};
class sensorIMU {
public:
sensorIMU();
void sleepSensors();
void setupSensors();
accelerometerValues readSensorAccelerometer();
gyroscopeValues readSensorGyroscope();
private:
struct qmiData _qmiData;
SensorQMI8658 _qmi;
kalman _kalmanAccelX;
kalman _kalmanAccelY;
kalman _kalmanAccelZ;
kalman _kalmanGyroX;
kalman _kalmanGyroY;
kalman _kalmanGyroZ;
};
#endif