From 182a42b89c5eb2373a3725a7aea197e6b6d66523 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 11 Dec 2021 15:49:50 +0100 Subject: mpu9250: store current fsr setting after change --- src/driver/mpu9250.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/driver/mpu9250.cc b/src/driver/mpu9250.cc index e34a4a7..bef086f 100644 --- a/src/driver/mpu9250.cc +++ b/src/driver/mpu9250.cc @@ -89,6 +89,7 @@ void MPU9250::setGyroFSR(MPU9250::gyro_fsr_e fsr) txbuf[0] = MPU9250_GYRO_CONFIG; txbuf[1] = fsr << GYRO_CONFIG_GYRO_FS_SEL; i2c.xmit(address, 2, txbuf, 0, rxbuf); + gyro_fsr = fsr; } void MPU9250::setAccelFSR(MPU9250::accel_fsr_e fsr) @@ -96,6 +97,7 @@ void MPU9250::setAccelFSR(MPU9250::accel_fsr_e fsr) txbuf[0] = MPU9250_ACCEL_CONFIG; txbuf[1] = fsr << ACCEL_CONFIG_ACCEL_FS_SEL; i2c.xmit(address, 2, txbuf, 0, rxbuf); + accel_fsr = fsr; } void MPU9250::AGSleep() -- cgit v1.2.3