Remove dangerous _primary_hgt_source variable

This commit is contained in:
kamilritz
2019-12-11 17:23:45 +02:00
committed by Mathieu Bresciani
parent 66f707ede0
commit 042d9b6615
3 changed files with 1 additions and 7 deletions
-5
View File
@@ -177,11 +177,6 @@ bool Ekf::initialiseFilter()
}
}
// set the default height source from the adjustable parameter
if (_hgt_counter == 0) {
_primary_hgt_source = _params.vdist_sensor_type;
}
// accumulate enough height measurements to be confident in the quality of the data
// we use baro height initially and switch to GPS/range/EV finder later when it passes checks.
if (_baro_buffer.pop_first_older_than(_imu_sample_delayed.time_us, &_baro_sample_delayed)) {