Skip to content

Commit

Permalink
range finder: reject if min/max value
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophTobler committed Jul 31, 2017
1 parent e3b61f2 commit 02ea10e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/ekf2/ekf2_main.cpp
Expand Up @@ -554,8 +554,8 @@ void Ekf2::run()
if (range_finder_updated) {
orb_copy(ORB_ID(distance_sensor), range_finder_sub, &range_finder);

if (range_finder.min_distance > range_finder.current_distance
|| range_finder.max_distance < range_finder.current_distance) {
if (range_finder.min_distance >= range_finder.current_distance
|| range_finder.max_distance <= range_finder.current_distance) {
range_finder_updated = false;
}
}
Expand Down

0 comments on commit 02ea10e

Please sign in to comment.