diff --git a/src/motion/BMX160Sensor.cpp b/src/motion/BMX160Sensor.cpp index 3db308c6b..3e11b9eaf 100755 --- a/src/motion/BMX160Sensor.cpp +++ b/src/motion/BMX160Sensor.cpp @@ -67,7 +67,7 @@ int32_t BMX160Sensor::runOnce() showingScreen = false; screen->endAlert(); - updateState(); + saveState(); } // LOG_DEBUG("BMX160 min_x: %.4f, max_X: %.4f, min_Y: %.4f, max_Y: %.4f, min_Z: %.4f, max_Z: %.4f", lowestX, highestX, @@ -150,7 +150,7 @@ void BMX160Sensor::loadState() #endif } -void BMX160Sensor::updateState() +void BMX160Sensor::saveState() { #ifdef FSCom memcpy(&bmx160State, &bmx160Config, sizeof(BMX160Config)); diff --git a/src/motion/BMX160Sensor.h b/src/motion/BMX160Sensor.h index a03155531..24a194a88 100755 --- a/src/motion/BMX160Sensor.h +++ b/src/motion/BMX160Sensor.h @@ -12,7 +12,7 @@ #include "Fusion/Fusion.h" #include -#define BMX160_MAX_STATE_BLOB_SIZE (144) // pad size to allow for additional saved config parameters (accel, gyro, etc) +#define BMX160_MAX_STATE_BLOB_SIZE (256) // pad size to allow for additional saved config parameters (accel, gyro, etc) struct xyzFloat { float x; @@ -38,7 +38,7 @@ class BMX160Sensor : public MotionSensor const char *bmx160ConfigFileName = "/prefs/bmx160.dat"; uint8_t bmx160State[BMX160_MAX_STATE_BLOB_SIZE] = {0}; void loadState(); - void updateState(); + void saveState(); public: explicit BMX160Sensor(ScanI2C::FoundDevice foundDevice);