mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
sensors: force parameter update if mag device id still isn't set
This commit is contained in:
parent
8592fe2358
commit
bdcccb1723
@ -405,6 +405,11 @@ void VotedSensorsUpdate::magPoll(vehicle_magnetometer_s &magnetometer)
|
||||
|
||||
if (_mag.enabled[uorb_index] && _mag.subscription[uorb_index].update(&mag_report)) {
|
||||
|
||||
// force parameter update (loads calibration) if device id still isn't set
|
||||
if (_mag_device_id[uorb_index] == 0) {
|
||||
parametersUpdate();
|
||||
}
|
||||
|
||||
// First publication with data
|
||||
if (_mag.priority[uorb_index] == 0) {
|
||||
_mag.priority[uorb_index] = _mag.subscription[uorb_index].get_priority();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user