From f783982edbb106bfb88ac3f6e6440056e59e1fc3 Mon Sep 17 00:00:00 2001 From: mcsauder Date: Tue, 25 Jun 2019 07:15:19 -0600 Subject: [PATCH] Revert changes to the check_params(const bool force) declaration/definition to match current PX4:master. --- src/modules/land_detector/LandDetector.cpp | 6 +++--- src/modules/land_detector/LandDetector.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/land_detector/LandDetector.cpp b/src/modules/land_detector/LandDetector.cpp index 6bbafa2524..1680589da7 100644 --- a/src/modules/land_detector/LandDetector.cpp +++ b/src/modules/land_detector/LandDetector.cpp @@ -78,7 +78,7 @@ void LandDetector::Run() { perf_begin(_cycle_perf); - _check_params(); + _check_params(false); _actuator_armed_sub.update(&_arming); _update_topics(); _update_state(); @@ -148,11 +148,11 @@ void LandDetector::Run() } } -void LandDetector::_check_params() +void LandDetector::_check_params(const bool force) { parameter_update_s param_update; - if (_param_update_sub.update(¶m_update)) { + if (_param_update_sub.update(¶m_update) || force) { _update_params(); _total_flight_time = static_cast(_param_total_flight_time_high.get()) << 32; _total_flight_time |= _param_total_flight_time_low.get(); diff --git a/src/modules/land_detector/LandDetector.h b/src/modules/land_detector/LandDetector.h index d93db958e5..5d9c648a8c 100644 --- a/src/modules/land_detector/LandDetector.h +++ b/src/modules/land_detector/LandDetector.h @@ -157,7 +157,7 @@ protected: private: - void _check_params(); + void _check_params(bool force = false); void Run() override;