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:
Daniel Agar
2020-08-21 10:12:13 -04:00
parent 971b1e4b4d
commit 27f23ac290
124 changed files with 463 additions and 509 deletions
@@ -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;
}
}