sensors : remove deprecated (since 2015) mag rotation parameter

This commit is contained in:
Mohammed Kabir 2017-05-25 20:25:51 +02:00 committed by Lorenz Meier
parent 6ee09ca16f
commit 62b7645130
2 changed files with 0 additions and 56 deletions

View File

@ -935,40 +935,6 @@ PARAM_DEFINE_FLOAT(SENS_BOARD_X_OFF, 0.0f);
*/
PARAM_DEFINE_FLOAT(SENS_BOARD_Z_OFF, 0.0f);
/**
* External magnetometer rotation
*
* @value 0 No rotation
* @value 1 Yaw 45°
* @value 2 Yaw 90°
* @value 3 Yaw 135°
* @value 4 Yaw 180°
* @value 5 Yaw 225°
* @value 6 Yaw 270°
* @value 7 Yaw 315°
* @value 8 Roll 180°
* @value 9 Roll 180°, Yaw 45°
* @value 10 Roll 180°, Yaw 90°
* @value 11 Roll 180°, Yaw 135°
* @value 12 Pitch 180°
* @value 13 Roll 180°, Yaw 225°
* @value 14 Roll 180°, Yaw 270°
* @value 15 Roll 180°, Yaw 315°
* @value 16 Roll 90°
* @value 17 Roll 90°, Yaw 45°
* @value 18 Roll 90°, Yaw 90°
* @value 19 Roll 90°, Yaw 135°
* @value 20 Roll 270°
* @value 21 Roll 270°, Yaw 45°
* @value 22 Roll 270°, Yaw 90°
* @value 23 Roll 270°, Yaw 135°
* @value 24 Pitch 90°
* @value 25 Pitch 270°
*
* @group Sensor Calibration
*/
PARAM_DEFINE_INT32(SENS_EXT_MAG_ROT, 0);
/**
* Select primary magnetometer
*

View File

@ -474,28 +474,6 @@ void VotedSensorsUpdate::parameters_update()
mag_rot = 0;
param_set_no_notification(param_find(str), &mag_rot);
}
/* handling of old setups, will be removed later (noted Feb 2015) */
int32_t deprecated_mag_rot = 0;
param_get(param_find("SENS_EXT_MAG_ROT"), &deprecated_mag_rot);
/*
* If the deprecated parameter is non-default (is != 0),
* and the new parameter is default (is == 0), then this board
* was configured already and we need to copy the old value
* to the new parameter.
* The < 0 case is special: It means that this param slot was
* used previously by an internal sensor, but the the call above
* proved that it is currently occupied by an external sensor.
* In that case we consider the orientation to be default as well.
*/
if ((deprecated_mag_rot != 0) && (mag_rot <= 0)) {
mag_rot = deprecated_mag_rot;
param_set_no_notification(param_find(str), &mag_rot);
/* clear the old param, not supported in GUI anyway */
deprecated_mag_rot = 0;
param_set_no_notification(param_find("SENS_EXT_MAG_ROT"), &deprecated_mag_rot);
}
}
if (failed) {