rotations: sync rotation enum, SENS_BOARD_ROT, CAL_MAGx_ROT with MAV_SENSOR_ORIENTATION

This commit is contained in:
Daniel Agar
2020-09-21 17:38:56 -04:00
parent 8b26b84fd1
commit 00e955cc3e
9 changed files with 25 additions and 89 deletions
-12
View File
@@ -739,15 +739,6 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t cal_ma
// FALLTHROUGH
case ROTATION_ROLL_270_YAW_180: // skip 41, same as 31 ROTATION_ROLL_90_PITCH_180
// FALLTHROUGH
case ROTATION_ROLL_270_YAW_270: // skip 42, same as 36 ROTATION_ROLL_90_PITCH_180_YAW_90
// FALLTHROUGH
case ROTATION_PITCH_90_YAW_180: // skip 43, same as 29 ROTATION_ROLL_180_PITCH_90
// FALLTHROUGH
case ROTATION_PITCH_9_YAW_180: // skip, too close to ROTATION_YAW_180
MSE[r] = FLT_MAX;
break;
@@ -804,9 +795,6 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t cal_ma
switch (worker_data.calibration[cur_mag].rotation_enum()) {
case ROTATION_ROLL_90_PITCH_68_YAW_293:
// FALLTHROUGH
case ROTATION_PITCH_9_YAW_180:
PX4_INFO("[cal] External Mag: %d (%d), keeping manually configured rotation %d", cur_mag,
worker_data.calibration[cur_mag].device_id(), worker_data.calibration[cur_mag].rotation_enum());
continue;
+18 -11
View File
@@ -131,19 +131,26 @@ PARAM_DEFINE_FLOAT(SENS_DPRES_ANSC, 0);
* @value 23 Roll 270°, Yaw 135°
* @value 24 Pitch 90°
* @value 25 Pitch 270°
* @value 26 Roll 270°, Yaw 27
* @value 27 Roll 180°, Pitch 270°
* @value 28 Pitch 90°, Yaw 180
* @value 29 Pitch 90°, Roll 90°
* @value 30 Yaw 293°, Pitch 68°, Roll 90° (Solo)
* @value 31 Pitch 90°, Roll 27
* @value 32 Pitch 9°, Yaw 180°
* @value 33 Pitch 45°
* @value 34 Pitch 315°
* @value 35 Roll 90°, Yaw 270°
* @value 26 Pitch 180°, Yaw 9
* @value 27 Pitch 180°, Yaw 270°
* @value 28 Roll 90°, Pitch 90°
* @value 29 Roll 180°, Pitch 90°
* @value 30 Roll 270°, Pitch 90°
* @value 31 Roll 90°, Pitch 18
* @value 32 Roll 270°, Pitch 180°
* @value 33 Roll 90°, Pitch 270°
* @value 34 Roll 180°, Pitch 270°
* @value 35 Roll 270°, Pitch 270°
* @value 36 Roll 90°, Pitch 180°, Yaw 90°
* @value 37 Roll 90°, Yaw 270°
* @value 38 Roll 90°, Pitch 68°, Yaw 293°
* @value 39 Pitch 315°
* @value 40 Roll 90°, Pitch 315°
* @value 41 Roll 270°, Yaw 180°
*
* @min -1
* @max 41
* @reboot_required true
*
* @group Sensors
*/
PARAM_DEFINE_INT32(SENS_BOARD_ROT, 0);
+1 -5
View File
@@ -105,13 +105,9 @@ PARAM_DEFINE_INT32(CAL_MAG0_PRIO, -1);
* @value 39 Pitch 315°
* @value 40 Roll 90°, Pitch 315°
* @value 41 Roll 270°, Yaw 180°
* @value 42 Roll 270°, Yaw 270°
* @value 43 Pitch 90°, Yaw 180°
* @value 44 Pitch 9°, Yaw 180°
* @value 45 Pitch 45°
*
* @min -1
* @max 45
* @max 41
* @reboot_required true
* @category system
* @group Sensor Calibration
+1 -5
View File
@@ -105,13 +105,9 @@ PARAM_DEFINE_INT32(CAL_MAG1_PRIO, -1);
* @value 39 Pitch 315°
* @value 40 Roll 90°, Pitch 315°
* @value 41 Roll 270°, Yaw 180°
* @value 42 Roll 270°, Yaw 270°
* @value 43 Pitch 90°, Yaw 180°
* @value 44 Pitch 9°, Yaw 180°
* @value 45 Pitch 45°
*
* @min -1
* @max 45
* @max 41
* @reboot_required true
* @category system
* @group Sensor Calibration
+1 -5
View File
@@ -105,13 +105,9 @@ PARAM_DEFINE_INT32(CAL_MAG2_PRIO, -1);
* @value 39 Pitch 315°
* @value 40 Roll 90°, Pitch 315°
* @value 41 Roll 270°, Yaw 180°
* @value 42 Roll 270°, Yaw 270°
* @value 43 Pitch 90°, Yaw 180°
* @value 44 Pitch 9°, Yaw 180°
* @value 45 Pitch 45°
*
* @min -1
* @max 45
* @max 41
* @reboot_required true
* @category system
* @group Sensor Calibration
+1 -5
View File
@@ -105,13 +105,9 @@ PARAM_DEFINE_INT32(CAL_MAG3_PRIO, -1);
* @value 39 Pitch 315°
* @value 40 Roll 90°, Pitch 315°
* @value 41 Roll 270°, Yaw 180°
* @value 42 Roll 270°, Yaw 270°
* @value 43 Pitch 90°, Yaw 180°
* @value 44 Pitch 9°, Yaw 180°
* @value 45 Pitch 45°
*
* @min -1
* @max 45
* @max 41
* @reboot_required true
* @category system
* @group Sensor Calibration