Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix # 12991 Change LSM6DSO gyro scaling to 70 mdps/LSB #13014

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/drivers/accgyro/accgyro_spi_lsm6dso_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@

#define LSM6DSO_CHIP_ID 0x6C

// equivalent to 70 mdps/LSB, as specified in LSM6DSO datasheet section 4.1, symbol G_So
#define LSM6DSO_GYRO_SCALE_2000DPS 0.070f

// LSM6DSO register configuration values
typedef enum {
LSM6DSO_VAL_INT1_CTRL = 0x02, // enable gyro data ready interrupt pin 1
Expand Down Expand Up @@ -198,7 +201,7 @@ bool lsm6dsoSpiGyroDetect(gyroDev_t *gyro)

gyro->initFn = lsm6dsoSpiGyroInit;
gyro->readFn = lsm6dsoGyroRead;
gyro->scale = GYRO_SCALE_2000DPS;
gyro->scale = LSM6DSO_GYRO_SCALE_2000DPS;

return true;
}
Expand Down