You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ltc_encoder_set_filter() sets the filter_const field to zero in case rise_time is <= zero.
e->filter_const should be set to 1.0 instead. That's the correct value for the filter constant when no filtering has to take place. Terms will cancel out and your filter equation will return exactly the original sample.
However you are conditionally running your filter loop based on the (wrong) value of the filter constant, so we need to change the condition inside the addvalues() function as well. if (tcf > 0) should become if (tcf < 1.0)
I realized about this because ltc_encoder_get_filter() kept returning the wrong value for rise_time = 0.
The text was updated successfully, but these errors were encountered:
ltc_encoder_set_filter() sets the filter_const field to zero in case rise_time is <= zero.
e->filter_const should be set to 1.0 instead. That's the correct value for the filter constant when no filtering has to take place. Terms will cancel out and your filter equation will return exactly the original sample.
However you are conditionally running your filter loop based on the (wrong) value of the filter constant, so we need to change the condition inside the addvalues() function as well.
if (tcf > 0)
should becomeif (tcf < 1.0)
I realized about this because ltc_encoder_get_filter() kept returning the wrong value for rise_time = 0.
The text was updated successfully, but these errors were encountered: