48#include <hal/gpio_types.h>
49#include <soc/gpio_num.h>
66 float fvLastAccelRaw[3];
82 float fCorrectLast[3];
uint32_t computetime
Definition hdw-imu.h:57
esp_err_t accelGetOrientVec(int16_t *x, int16_t *y, int16_t *z)
Get the current orientation "up" vector from device point of view.
Definition hdw-imu.c:638
esp_err_t initAccelerometer(gpio_num_t sda, gpio_num_t scl, gpio_pullup_t pullup)
Initialize the IMU.
Definition hdw-imu.c:265
LSM6DSLData LSM6DSL
Definition hdw-imu.c:98
uint32_t sampCount
Definition hdw-imu.h:75
esp_err_t accelGetSteeringAngleDegrees(int16_t *xcomp, int16_t *ycomp)
Get a steering wheel style input. Use getAtan2( xcomp, ycomp ) to get angle. 0..360 with 180 being up...
Definition hdw-imu.c:698
uint32_t performCal
Definition hdw-imu.h:58
esp_err_t accelGetQuaternion(float *q)
Get the current estimated quaternion of the IMU.
Definition hdw-imu.c:653
int lastreadr
Definition hdw-imu.h:78
esp_err_t accelPerformCal(void)
Initialize calibration of IMU.
Definition hdw-imu.c:668
esp_err_t accelIntegrate(void)
Read all pending samples in IMU and perform a sensor fusion pass.
Definition hdw-imu.c:363
float accelGetStdDevInCal(void)
Get current divergence as the cal algorithm attempts to converge on a good cal.
Definition hdw-imu.c:736
esp_err_t accelGetAccelVecRaw(int16_t *x, int16_t *y, int16_t *z)
Get the RAW accelerometer "up" vector from device point of view.
Definition hdw-imu.c:625
int32_t temp
Definition hdw-imu.h:56
esp_err_t deInitAccelerometer(void)
Deinit the accelerometer (nothing to do)
Definition hdw-imu.c:353
void accelSetRegistersAndReset(void)
Reset the IMU's core registers. Should be done any time you are entering a mode with the IMU.
Definition hdw-imu.c:748