mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:58:54 +08:00
sensors : fix race condition triggered by slow-to-boot external sensors
This commit is contained in:
committed by
Lorenz Meier
parent
51b23f0b57
commit
5a96490c68
@@ -740,6 +740,11 @@ void VotedSensorsUpdate::mag_poll(struct sensor_combined_s &raw)
|
||||
|
||||
// First publication with data
|
||||
if (_mag.priority[uorb_index] == 0) {
|
||||
|
||||
// Parameters update to get offsets and scaling loaded (if not already loaded)
|
||||
parameters_update();
|
||||
|
||||
// Set device priority for the voter
|
||||
int32_t priority = 0;
|
||||
orb_priority(_mag.subscription[uorb_index], &priority);
|
||||
_mag.priority[uorb_index] = (uint8_t)priority;
|
||||
|
||||
Reference in New Issue
Block a user