mirror of
https://github.com/meshtastic/firmware.git
synced 2026-04-16 13:17:11 -04:00
Update src/motion/MotionSensor.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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<const uint8_t *>(&record), sizeof(record));
|
||||
return (written == sizeof(record)) && file.close();
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user