forked from Archive/PX4-Autopilot
lib/sensor_calibration: don't save uninitialized priority parameter immediately
This commit is contained in:
parent
e694fa906b
commit
00eae055ac
|
@ -203,9 +203,10 @@ void Accelerometer::ParametersUpdate()
|
|||
if (_priority != -1) {
|
||||
PX4_ERR("%s %" PRIu32 " (%" PRId8 ") invalid priority %" PRId32 ", resetting to %" PRId32, SensorString(), _device_id,
|
||||
_calibration_index, _priority, new_priority);
|
||||
|
||||
SetCalibrationParam(SensorString(), "PRIO", _calibration_index, new_priority);
|
||||
}
|
||||
|
||||
SetCalibrationParam(SensorString(), "PRIO", _calibration_index, new_priority);
|
||||
_priority = new_priority;
|
||||
}
|
||||
|
||||
|
|
|
@ -188,9 +188,10 @@ void Gyroscope::ParametersUpdate()
|
|||
if (_priority != -1) {
|
||||
PX4_ERR("%s %" PRIu32 " (%" PRId8 ") invalid priority %" PRId32 ", resetting to %" PRId32, SensorString(), _device_id,
|
||||
_calibration_index, _priority, new_priority);
|
||||
|
||||
SetCalibrationParam(SensorString(), "PRIO", _calibration_index, new_priority);
|
||||
}
|
||||
|
||||
SetCalibrationParam(SensorString(), "PRIO", _calibration_index, new_priority);
|
||||
_priority = new_priority;
|
||||
}
|
||||
|
||||
|
|
|
@ -188,9 +188,10 @@ void Magnetometer::ParametersUpdate()
|
|||
if (_priority != -1) {
|
||||
PX4_ERR("%s %" PRIu32 " (%" PRId8 ") invalid priority %" PRId32 ", resetting to %" PRId32, SensorString(), _device_id,
|
||||
_calibration_index, _priority, new_priority);
|
||||
|
||||
SetCalibrationParam(SensorString(), "PRIO", _calibration_index, new_priority);
|
||||
}
|
||||
|
||||
SetCalibrationParam(SensorString(), "PRIO", _calibration_index, new_priority);
|
||||
_priority = new_priority;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue