forked from cyoung/linux-mpu9150
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibimu.h
More file actions
31 lines (24 loc) · 826 Bytes
/
Copy pathlibimu.h
File metadata and controls
31 lines (24 loc) · 826 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
#ifndef LIBIMU_H
#define LIBIMU_H
// To avoid having to pass the same command line switches when running
// the test apps, you can specify the defaults for your platform here.
// RPi I2C bus
#define DEFAULT_I2C_BUS (1)
// platform independent
//#define DEFAULT_SAMPLE_RATE_HZ (10)
//#define DEFAULT_YAW_MIX_FACTOR (0)
#ifdef __cplusplus
extern "C" {
#endif
extern void close_mpu(void);
//extern int init_mpu(void);
extern int init_mpu(int sample_rate, int yaw_mix_factor);
extern int read_mpu(float *pitch, float *roll, float *heading);
extern int read_mpu_raw(float *gx, float *gy, float *gz, float *ax, float *ay, float *az, float *mx, float *my, float *mz);
extern int set_cal(int mag, char *cal_file);
extern int enableFusion(void);
extern int disableFusion(void);
#ifdef __cplusplus
}
#endif
#endif /* LIBIMU_H */