mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-03-24 18:44:03 +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/atmosphere/atmosphere.h>
|
||||
|
||||
|
||||
namespace sensors
|
||||
{
|
||||
|
||||
@@ -188,6 +187,12 @@ void VehicleAirData::Run()
|
||||
_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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user