diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-12-11 15:49:50 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-12-11 15:49:50 +0100 |
commit | 182a42b89c5eb2373a3725a7aea197e6b6d66523 (patch) | |
tree | 5575782a6aa8c5704aa78fded190f041d442833e | |
parent | 6f3983ee29091c324e06c545bb1f2951cbe8e251 (diff) |
mpu9250: store current fsr setting after change
-rw-r--r-- | src/driver/mpu9250.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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() |