fix(sensors): disable SENS_MAG_AUTOCAL by default, keep for CAN nodes (#27659)

PR #18421 added the initial mag calibration save and was deliberately merged with SENS_MAG_AUTOCAL=0 until parameter system concerns were addressed. PR #19818 (CAN GPS nodes) flipped the global default to 1 as an undiscussed side change, shipped in v1.14.0. Since then every uncalibrated mag marks itself calibrated (CAL_MAGn_ID set) shortly after the disarmed bias estimator stabilizes, so ground stations stop prompting for compass calibration on new setups, and the first flight happens on a hard-iron-only estimate with an assumed mount rotation.

Restore the disabled default and enable it where it is genuinely needed: CAN nodes, which have no GCS calibration flow and no EKF for in-flight refinement. MBE_ENABLE is untouched, the bias estimator still runs and corrects everywhere.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
Jacob Dahl
2026-06-12 19:17:53 -06:00
committed by GitHub
parent da315b7813
commit 940af26b4b
2 changed files with 6 additions and 2 deletions

View File

@@ -107,6 +107,8 @@ then
# conservative mag bias estimation
param set-default MBE_LEARN_GAIN 5
param set-default IMU_GYRO_CUTOFF 20
# nodes have no GCS calibration flow, persist the estimated bias
param set-default SENS_MAG_AUTOCAL 1
mag_bias_estimator start
fi

View File

@@ -78,7 +78,9 @@ parameters:
description:
short: Magnetometer auto calibration
long: Automatically initialize magnetometer calibration from bias estimate
if available.
if available. The estimate only captures hard-iron offsets, so a full
calibration is still recommended. Mainly intended for remote nodes
(e.g. CAN GPS units) that cannot be calibrated from a ground station.
category: System
type: boolean
default: 1
default: 0