mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mag_bias_estimator: sensor update loop limit iterations
This commit is contained in:
parent
d96970a2b9
commit
87960c04d8
@ -157,10 +157,11 @@ void MagBiasEstimator::Run()
|
||||
bool updated = false;
|
||||
|
||||
for (int mag_index = 0; mag_index < MAX_SENSOR_COUNT; mag_index++) {
|
||||
int sensor_mag_updates = 0;
|
||||
sensor_mag_s sensor_mag;
|
||||
|
||||
while (_sensor_mag_subs[mag_index].update(&sensor_mag)) {
|
||||
|
||||
while ((sensor_mag_updates < sensor_mag_s::ORB_QUEUE_LENGTH) && _sensor_mag_subs[mag_index].update(&sensor_mag)) {
|
||||
sensor_mag_updates++;
|
||||
updated = true;
|
||||
|
||||
// apply existing mag calibration
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user