Filter: set output slew rate to zero when max is zero.

This commit is contained in:
Andy Piper 2021-11-10 10:10:36 +00:00 committed by Andrew Tridgell
parent 4b1124c5e2
commit 9dd4314341
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@ SlewLimiter::SlewLimiter(const float &_slew_rate_max, const float &_slew_rate_ta
float SlewLimiter::modifier(float sample, float dt)
{
if (slew_rate_max <= 0) {
_output_slew_rate = 0.0;
return 1.0;
}