From 386673e6c32be6ce25e8439611bded1612d45796 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 9 Dec 2019 12:48:07 -0500 Subject: [PATCH] fix flt_cutoff_min -> flt_cutoff_max --- src/modules/rc_update/rc_update.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/rc_update/rc_update.cpp b/src/modules/rc_update/rc_update.cpp index 2cf859419e..a0107700e6 100644 --- a/src/modules/rc_update/rc_update.cpp +++ b/src/modules/rc_update/rc_update.cpp @@ -112,10 +112,10 @@ RCUpdate::parameters_updated() } // make sure the filter is in its stable region -> fc < fs/2 - const float flt_cutoff_min = _param_rc_flt_smp_rate.get() / 2.0f - 1.0f; + const float flt_cutoff_max = _param_rc_flt_smp_rate.get() / 2.0f - 1.0f; if (_param_rc_flt_cutoff.get() > flt_cutoff_max) { - _param_rc_flt_cutoff.set(flt_cutoff_min); + _param_rc_flt_cutoff.set(flt_cutoff_max); _param_rc_flt_cutoff.commit_no_notification(); }