From 4e3f7bdcc6fa99471e6879b1ba288834e85ee247 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Fri, 13 Jul 2018 07:31:07 +1000 Subject: [PATCH] ekf2: Move range min/max checks to inside the ecl library --- src/lib/ecl | 2 +- src/modules/ekf2/ekf2_main.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/ecl b/src/lib/ecl index 41953ab582..4d59c834eb 160000 --- a/src/lib/ecl +++ b/src/lib/ecl @@ -1 +1 @@ -Subproject commit 41953ab5823fe0e6d062e3641c37f5c05a3e5cc2 +Subproject commit 4d59c834ebb181b78294ec3981c3d32b470e6f15 diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 9d8880bb5d..42ae8d73dc 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -939,10 +939,9 @@ void Ekf2::run() distance_sensor_s range_finder; if (orb_copy(ORB_ID(distance_sensor), _range_finder_subs[_range_finder_sub_index], &range_finder) == PX4_OK) { - // check if distance sensor is within working boundaries - if (range_finder.min_distance >= range_finder.current_distance || - range_finder.max_distance <= range_finder.current_distance || - range_finder.signal_quality == 0) { + // check distance sensor data quality + // TODO - move this check inside the ecl library + if (range_finder.signal_quality == 0) { // use rng_gnd_clearance if on ground if (_ekf.get_in_air_status()) { range_finder_updated = false;