20 #include "../drivers/accgyro.h"
21 #include "../common/axis.h"
22 #include "../config/accelerometer.h"
23 #include "../config/sensors.h"
44 static inline int32_t ins_acc_get_x(
struct ins_acc *
self) {
return self->accADC[
X]; }
45 static inline int32_t ins_acc_get_y(
struct ins_acc *
self) {
return self->accADC[
Y]; }
46 static inline int32_t ins_acc_get_z(
struct ins_acc *
self) {
return self->accADC[
Z]; }
#define XYZ_AXIS_COUNT
Definition: axis.h:26
struct sensor_trims_config trims
Local trims that we adjust as we calibrate.
Definition: acceleration.h:35
int32_t accADC[XYZ_AXIS_COUNT]
Definition: acceleration.h:26
const struct accelerometer_config * config
Definition: acceleration.h:32
void ins_acc_init(struct ins_acc *self, const struct sensor_trims_config *trims, const struct accelerometer_config *config)
Definition: acceleration.c:53
Definition: acceleration.h:25
int32_t b[3]
Definition: acceleration.h:29
uint16_t calibratingA
Definition: acceleration.h:27
uint8_t z
set the acc deadband for z-Axis, this ignores small accelerations
Definition: accelerometer.h:52
rollAndPitchTrims_t trims
accelerometer trim
Definition: accelerometer.h:51
void ins_acc_process_sample(struct ins_acc *self, int32_t x, int32_t y, int32_t z)
Definition: acceleration.c:111
Definition: accelerometer.h:48
int32_t a[3]
Definition: acceleration.h:28
bool ins_acc_is_calibrated(struct ins_acc *self)
Definition: acceleration.c:151
void ins_acc_calibrate(struct ins_acc *self)
Definition: acceleration.c:145