summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--filter-accela/ftnoir_filter_accela.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp
index d3464f7b..940ac50c 100644
--- a/filter-accela/ftnoir_filter_accela.cpp
+++ b/filter-accela/ftnoir_filter_accela.cpp
@@ -154,7 +154,8 @@ void accela::filter(const double* input, double *output)
{
output[k] *= dt;
output[k] += last_output[k];
- if (fabs(output[k]) > half_turn) output[k] -= copysign(full_turn, output[k]);
+ if (k >= Yaw && fabs(output[k]) > half_turn)
+ output[k] -= copysign(full_turn, output[k]);
last_output[k] = output[k];
}