mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 09:53:38 +08:00
move initial sensor priority to parameters and purge ORB_PRIORITY
- CAL_ACCx_EN -> CAL_ACCx_PRIO - CAL_GYROx_EN -> CAL_GYROx_PRIO - CAL_MAGx_EN -> CAL_MAGx_PRIO
This commit is contained in:
@@ -156,11 +156,6 @@ void VehicleAirData::Run()
|
||||
updated[uorb_index] = _sensor_sub[uorb_index].update(&_last_data[uorb_index]);
|
||||
|
||||
if (updated[uorb_index]) {
|
||||
if (_priority[uorb_index] == 0) {
|
||||
// set initial priority
|
||||
_priority[uorb_index] = _sensor_sub[uorb_index].get_priority();
|
||||
}
|
||||
|
||||
// millibar to Pa
|
||||
const float raw_pressure_pascals = _last_data[uorb_index].pressure * 100.f;
|
||||
|
||||
@@ -282,7 +277,7 @@ void VehicleAirData::Run()
|
||||
}
|
||||
|
||||
// reduce priority of failed sensor to the minimum
|
||||
_priority[failover_index] = ORB_PRIO_MIN;
|
||||
_priority[failover_index] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user