altos: Shorten accel-only integration ground interval
authorKeith Packard <keithp@keithp.com>
Fri, 16 Oct 2020 19:58:57 +0000 (12:58 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 16 Oct 2020 19:58:57 +0000 (12:58 -0700)
Set interval to 64 samples for resetting the accumulated speed/height
on the ground in accel-only configurations.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_sample.c

index a7f5006590264a0a6d1e6dd348c87fb18e2136d7..46771496b69a4745cd6ea24597f9fa048c7243ba 100644 (file)
@@ -323,7 +323,7 @@ ao_sample_preflight_update(void)
        else
                ao_sample_preflight_set();
 #if !HAS_BARO
-       if ((nsamples & 0x7f) == 0)
+       if ((nsamples & 0x3f) == 0)
                ao_kalman_reset_accumulate();
 #endif
 }