mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-16 17:30:34 +08:00
Mag cal: allow 6, 3 and 2 side calibrations (and anything in-between with bitfields)
This commit is contained in:
@@ -687,6 +687,25 @@ PARAM_DEFINE_INT32(CAL_GYRO_PRIME, 0);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CAL_MAG_PRIME, 0);
|
||||
|
||||
/**
|
||||
* Bitfield selecting mag sides for calibration
|
||||
*
|
||||
* DETECT_ORIENTATION_TAIL_DOWN = 1
|
||||
* DETECT_ORIENTATION_NOSE_DOWN = 2
|
||||
* DETECT_ORIENTATION_LEFT = 4
|
||||
* DETECT_ORIENTATION_RIGHT = 8
|
||||
* DETECT_ORIENTATION_UPSIDE_DOWN = 16
|
||||
* DETECT_ORIENTATION_RIGHTSIDE_UP = 32
|
||||
*
|
||||
* @min 34
|
||||
* @max 63
|
||||
* @value 34 Two side calibration
|
||||
* @value 38 Three side calibration
|
||||
* @value 63 Six side calibration
|
||||
* @group Sensor Calibration
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CAL_MAG_SIDES, 63);
|
||||
|
||||
/**
|
||||
* Primary baro ID
|
||||
*
|
||||
|
||||
@@ -672,6 +672,7 @@ Sensors::Sensors() :
|
||||
(void)param_find("CAL_MAG0_ROT");
|
||||
(void)param_find("CAL_MAG1_ROT");
|
||||
(void)param_find("CAL_MAG2_ROT");
|
||||
(void)param_find("CAL_MAG_SIDES");
|
||||
(void)param_find("SYS_PARAM_VER");
|
||||
(void)param_find("SYS_AUTOSTART");
|
||||
(void)param_find("SYS_AUTOCONFIG");
|
||||
|
||||
Reference in New Issue
Block a user