mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 15:17:34 +08:00
sensors : fix race condition triggered by slow-to-boot external sensors
This commit is contained in:
committed by
Lorenz Meier
parent
feeb3ea18d
commit
e4a221bd92
@@ -722,6 +722,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