48#include <hal/gpio_types.h>
49#include <soc/gpio_num.h>
LSM6DSLData LSM6DSL
Definition hdw-imu.c:98
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:655
esp_err_t initAccelerometer(gpio_num_t sda, gpio_num_t scl, gpio_pullup_t pullup)
Initialize the IMU.
Definition hdw-imu.c:265
float fvLastAccelRaw[3]
Definition hdw-imu.h:66
void powerUpAccel(void)
Power up the accelerometer and gyroscope.
Definition hdw-imu.c:370
uint32_t sampCount
Definition hdw-imu.h:75
int32_t gyroaccum[3]
Definition hdw-imu.h:79
float fvAverage[3]
Definition hdw-imu.h:73
float fvBias[3]
Definition hdw-imu.h:69
float fCorrectLast[3]
Definition hdw-imu.h:82
void powerDownAccel(void)
Power down the accelerometer and gyroscope.
Definition hdw-imu.c:361
int16_t gyrolast[3]
Definition hdw-imu.h:80
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:715
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:670
int lastreadr
Definition hdw-imu.h:78
float fvDeviation[3]
Definition hdw-imu.h:72
float fqQuat[4]
Definition hdw-imu.h:63
esp_err_t accelPerformCal(void)
Initialize calibration of IMU.
Definition hdw-imu.c:685
esp_err_t accelIntegrate(void)
Read all pending samples in IMU and perform a sensor fusion pass.
Definition hdw-imu.c:380
float accelGetStdDevInCal(void)
Get current divergence as the cal algorithm attempts to converge on a good cal.
Definition hdw-imu.c:753
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:642
int16_t accellast[3]
Definition hdw-imu.h:81
int32_t temp
Definition hdw-imu.h:56
esp_err_t deInitAccelerometer(void)
Deinit the accelerometer (nothing to do)
Definition hdw-imu.c:353
float fqQuatLast[4]
Definition hdw-imu.h:62
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:765