From 12ef994a24eb996458092dc35c671d6b824b1576 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 27 Aug 2017 16:57:13 -0700 Subject: [PATCH] altos: Eliminate separate height error filter for accelerometer devices We don't use the error value in flight for those models anyways; it's only useful on baro-only hardware. Signed-off-by: Keith Packard --- src/kernel/ao_kalman.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/kernel/ao_kalman.c b/src/kernel/ao_kalman.c index d401a3c8..87f1bf66 100644 --- a/src/kernel/ao_kalman.c +++ b/src/kernel/ao_kalman.c @@ -96,13 +96,8 @@ ao_kalman_err_height(void) e = -e; if (e > 127) e = 127; -#if HAS_ACCEL - ao_error_h_sq_avg -= ao_error_h_sq_avg >> 2; - ao_error_h_sq_avg += (e * e) >> 2; -#else ao_error_h_sq_avg -= ao_error_h_sq_avg >> 4; ao_error_h_sq_avg += (e * e) >> 4; -#endif if (ao_flight_state >= ao_flight_drogue) return; -- 2.30.2