mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 21:20:34 +08:00
sensor calibration delete temperature (CAL_ACCx_TEMP, CAL_GYROx_TEMP, CAL_MAGx_TEMP)
- this was an experiment to casually monitor sensor offsets relative to temperature, but now that all calibration offsets can be adjusted post-flight the stored temperature can be misleading - deleting to save a little bit of flash (and storing the temperature wasn't useful)
This commit is contained in:
@@ -192,16 +192,6 @@ bool Magnetometer::ParametersLoad()
|
||||
_priority = _external ? DEFAULT_EXTERNAL_PRIORITY : DEFAULT_PRIORITY;
|
||||
}
|
||||
|
||||
// CAL_MAGx_TEMP
|
||||
float cal_temp = GetCalibrationParamFloat(SensorString(), "TEMP", _calibration_index);
|
||||
|
||||
if (cal_temp > TEMPERATURE_INVALID) {
|
||||
set_temperature(cal_temp);
|
||||
|
||||
} else {
|
||||
set_temperature(NAN);
|
||||
}
|
||||
|
||||
// CAL_MAGx_OFF{X,Y,Z}
|
||||
set_offset(GetCalibrationParamsVector3f(SensorString(), "OFF", _calibration_index));
|
||||
|
||||
@@ -236,8 +226,6 @@ void Magnetometer::Reset()
|
||||
_power_compensation.zero();
|
||||
_power = 0.f;
|
||||
|
||||
_temperature = NAN;
|
||||
|
||||
_priority = _external ? DEFAULT_EXTERNAL_PRIORITY : DEFAULT_PRIORITY;
|
||||
|
||||
_calibration_index = -1;
|
||||
@@ -285,13 +273,6 @@ bool Magnetometer::ParametersSave(int desired_calibration_index, bool force)
|
||||
success &= SetCalibrationParam(SensorString(), "ROT", _calibration_index, -1); // internal
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(_temperature)) {
|
||||
success &= SetCalibrationParam(SensorString(), "TEMP", _calibration_index, _temperature);
|
||||
|
||||
} else {
|
||||
success &= SetCalibrationParam(SensorString(), "TEMP", _calibration_index, TEMPERATURE_INVALID);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -302,20 +283,18 @@ void Magnetometer::PrintStatus()
|
||||
{
|
||||
if (external()) {
|
||||
PX4_INFO_RAW("%s %" PRIu32
|
||||
" EN: %d, offset: [%05.3f %05.3f %05.3f], scale: [%05.3f %05.3f %05.3f], %.1f degC, Ext ROT: %d\n",
|
||||
" EN: %d, offset: [%05.3f %05.3f %05.3f], scale: [%05.3f %05.3f %05.3f], Ext ROT: %d\n",
|
||||
SensorString(), device_id(), enabled(),
|
||||
(double)_offset(0), (double)_offset(1), (double)_offset(2),
|
||||
(double)_scale(0, 0), (double)_scale(1, 1), (double)_scale(2, 2),
|
||||
(double)_temperature,
|
||||
rotation_enum());
|
||||
|
||||
} else {
|
||||
PX4_INFO_RAW("%s %" PRIu32
|
||||
" EN: %d, offset: [%05.3f %05.3f %05.3f], scale: [%05.3f %05.3f %05.3f], %.1f degC, Internal\n",
|
||||
" EN: %d, offset: [%05.3f %05.3f %05.3f], scale: [%05.3f %05.3f %05.3f], Internal\n",
|
||||
SensorString(), device_id(), enabled(),
|
||||
(double)_offset(0), (double)_offset(1), (double)_offset(2),
|
||||
(double)_scale(0, 0), (double)_scale(1, 1), (double)_scale(2, 2),
|
||||
(double)_temperature);
|
||||
(double)_scale(0, 0), (double)_scale(1, 1), (double)_scale(2, 2));
|
||||
}
|
||||
|
||||
#if defined(DEBUG_BUILD)
|
||||
|
||||
Reference in New Issue
Block a user