Skip to content

Commit

Permalink
Fix # 12991 Change LSM6DSO gyro scaling to 70 mdps/LSB (betaflight#13014
Browse files Browse the repository at this point in the history
)

Change LSM6DSO gyro scaling to 0.070 dps/lsb
  • Loading branch information
tbolin authored and davidbitton committed Feb 5, 2024
1 parent 564a3e9 commit 4979721
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 4979721

Please sign in to comment.