diff --git a/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp b/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp index e5da80250..6a9200d8a 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp +++ b/ground/openpilotgcs/src/plugins/config/calibration/sixpointcalibrationmodel.cpp @@ -481,7 +481,7 @@ void SixPointCalibrationModel::save() if (calibratingMag) { RevoCalibration::DataFields revoCalibrationData = revoCalibration->getData(); - for (int i = 0; i < RevoCalibration::MAG_TRANSFORM_R2C2; i++) { + for (int i = 0; i < RevoCalibration::MAG_TRANSFORM_NUMELEM; i++) { revoCalibrationData.mag_transform[i] = result.revoCalibrationData.mag_transform[i]; } for (int i = 0; i < 3; i++) {