Skip to content

Commit

Permalink
fix flt_cutoff_min -> flt_cutoff_max
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and LorenzMeier committed Dec 23, 2019
1 parent 93d392f commit 386673e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/rc_update/rc_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 386673e

Please sign in to comment.