Reset the calibration data back to 0 when doing a compass calibration

This commit is contained in:
Jonathan Bennett
2025-11-16 14:20:17 -06:00
parent 0aa11d810c
commit 6e3be132f2
2 changed files with 4 additions and 2 deletions

View File

@@ -116,6 +116,7 @@ void BMX160Sensor::calibrate(uint16_t forSeconds)
{
#if !defined(MESHTASTIC_EXCLUDE_SCREEN)
LOG_DEBUG("BMX160 calibration started for %is", forSeconds);
highestX = 0, lowestX = 0, highestY = 0, lowestY = 0, highestZ = 0, lowestZ = 0;
doCalibration = true;
uint16_t calibrateFor = forSeconds * 1000; // calibrate for seconds provided
@@ -127,4 +128,4 @@ void BMX160Sensor::calibrate(uint16_t forSeconds)
#endif
#endif
#endif

View File

@@ -157,6 +157,7 @@ void ICM20948Sensor::calibrate(uint16_t forSeconds)
{
#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
LOG_DEBUG("BMX160 calibration started for %is", forSeconds);
highestX = 0, lowestX = 0, highestY = 0, lowestY = 0, highestZ = 0, lowestZ = 0;
doCalibration = true;
uint16_t calibrateFor = forSeconds * 1000; // calibrate for seconds provided
@@ -295,4 +296,4 @@ bool ICM20948Singleton::setWakeOnMotion()
return true;
}
#endif
#endif