From ec61ae000367919861d6b09e0b33f3fdab53c8f0 Mon Sep 17 00:00:00 2001 From: ChristophTobler Date: Wed, 4 Oct 2017 11:55:09 +0200 Subject: [PATCH] ekf2: add some comments --- src/modules/ekf2/ekf2_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 40ffccc423..6505ad2570 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -107,7 +107,8 @@ public: int print_status() override; private: - int getRangeSubIndex(const int *subs); + int getRangeSubIndex(const int *subs); ///< get subscribtion index of first downward-facing range sensor + bool _replay_mode = false; ///< true when we use replay data from a log // time slip monitoring @@ -563,6 +564,7 @@ void Ekf2::run() if (range_finder_updated) { orb_copy(ORB_ID(distance_sensor), range_finder_subs[range_finder_sub_index], &range_finder); + // 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_updated = false;