From 6bf2667698b51adae90ef917005fbc5059dd4504 Mon Sep 17 00:00:00 2001 From: Hugo Chiang <1483569698@qq.com> Date: Sun, 30 Jun 2024 11:54:02 +0800 Subject: [PATCH] fix scale factor for st imus (#63) --- src/main/drivers/accgyro/accgyro_spi_asm330lhh_init.c | 2 +- src/main/drivers/accgyro/accgyro_spi_lsm6ds3_init.c | 2 +- src/main/drivers/accgyro/accgyro_spi_lsm6dsl_init.c | 2 +- src/main/drivers/accgyro/accgyro_spi_lsm6dso_init.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/drivers/accgyro/accgyro_spi_asm330lhh_init.c b/src/main/drivers/accgyro/accgyro_spi_asm330lhh_init.c index 1bed77658..1ec2c802c 100644 --- a/src/main/drivers/accgyro/accgyro_spi_asm330lhh_init.c +++ b/src/main/drivers/accgyro/accgyro_spi_asm330lhh_init.c @@ -237,7 +237,7 @@ bool asm330lhhSpiGyroDetect(gyroDev_t *gyro) gyro->initFn = asm330lhhSpiGyroInit; gyro->readFn = asm330lhhGyroRead; - gyro->scale = GYRO_SCALE_2000DPS; + gyro->scale = 0.07f; return true; } diff --git a/src/main/drivers/accgyro/accgyro_spi_lsm6ds3_init.c b/src/main/drivers/accgyro/accgyro_spi_lsm6ds3_init.c index 6fcc195e4..fac4bb7a9 100644 --- a/src/main/drivers/accgyro/accgyro_spi_lsm6ds3_init.c +++ b/src/main/drivers/accgyro/accgyro_spi_lsm6ds3_init.c @@ -212,7 +212,7 @@ bool lsm6ds3SpiGyroDetect(gyroDev_t *gyro) gyro->initFn = lsm6ds3SpiGyroInit; gyro->readFn = lsm6ds3GyroRead; - gyro->scale = GYRO_SCALE_2000DPS; + gyro->scale = 0.07f; return true; } diff --git a/src/main/drivers/accgyro/accgyro_spi_lsm6dsl_init.c b/src/main/drivers/accgyro/accgyro_spi_lsm6dsl_init.c index 705fe1a46..53b83abbd 100644 --- a/src/main/drivers/accgyro/accgyro_spi_lsm6dsl_init.c +++ b/src/main/drivers/accgyro/accgyro_spi_lsm6dsl_init.c @@ -232,7 +232,7 @@ bool lsm6dslSpiGyroDetect(gyroDev_t *gyro) gyro->initFn = lsm6dslSpiGyroInit; gyro->readFn = lsm6dslGyroRead; - gyro->scale = GYRO_SCALE_2000DPS; + gyro->scale = 0.07f; return true; } diff --git a/src/main/drivers/accgyro/accgyro_spi_lsm6dso_init.c b/src/main/drivers/accgyro/accgyro_spi_lsm6dso_init.c index 10ca6cc73..f3ce123e9 100644 --- a/src/main/drivers/accgyro/accgyro_spi_lsm6dso_init.c +++ b/src/main/drivers/accgyro/accgyro_spi_lsm6dso_init.c @@ -237,7 +237,7 @@ bool lsm6dsoSpiGyroDetect(gyroDev_t *gyro) gyro->initFn = lsm6dsoSpiGyroInit; gyro->readFn = lsm6dsoGyroRead; - gyro->scale = GYRO_SCALE_2000DPS; + gyro->scale = 0.07f; return true; }