diff --git a/src/motion/MotionSensor.cpp b/src/motion/MotionSensor.cpp index 4c85db35a..83231aea9 100644 --- a/src/motion/MotionSensor.cpp +++ b/src/motion/MotionSensor.cpp @@ -71,7 +71,7 @@ bool MotionSensor::saveMagnetometerCalibration(const char *filePath, float highe CompassCalibrationRecord record = { COMPASS_CALIBRATION_MAGIC, COMPASS_CALIBRATION_VERSION, 0, highestX, lowestX, highestY, lowestY, highestZ, lowestZ}; - auto file = SafeFile(filePath); + auto file = SafeFile(filePath, true); const size_t written = file.write(reinterpret_cast(&record), sizeof(record)); return (written == sizeof(record)) && file.close(); #else