mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:38:52 +08:00
always allow disabling uncalibrated baro (#23782)
* always set baro calibration id and prio param * change to ParametersSave * only save baro calib param if not calibrated
This commit is contained in:
@@ -38,7 +38,6 @@
|
|||||||
#include <lib/geo/geo.h>
|
#include <lib/geo/geo.h>
|
||||||
#include <lib/atmosphere/atmosphere.h>
|
#include <lib/atmosphere/atmosphere.h>
|
||||||
|
|
||||||
|
|
||||||
namespace sensors
|
namespace sensors
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -188,6 +187,12 @@ void VehicleAirData::Run()
|
|||||||
_sensor_sub[uorb_index].registerCallback();
|
_sensor_sub[uorb_index].registerCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_calibration[uorb_index].calibrated()) {
|
||||||
|
_calibration[uorb_index].set_device_id(report.device_id);
|
||||||
|
_calibration[uorb_index].ParametersSave(uorb_index);
|
||||||
|
param_notify_changes();
|
||||||
|
}
|
||||||
|
|
||||||
ParametersUpdate(true);
|
ParametersUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user