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;