forked from Archive/PX4-Autopilot
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…
Reference in New Issue