altos: Reset 3d-accel and motor pressure sums each ground interval
authorKeith Packard <keithp@keithp.com>
Sat, 17 Oct 2020 03:48:55 +0000 (20:48 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 17 Oct 2020 03:55:27 +0000 (20:55 -0700)
commit577918f429050f61e2e7d220d68a4a2bd52ad56e
treeee6271d019bebb21ba78eeb1e4852f296478a43f
parent63c2167102de33e79ab66c0ceaa385b24935789e
altos: Reset 3d-accel and motor pressure sums each ground interval

We're repeatedly averaging 512 ground samples to get up-to-date values
for all of the sensors, but we need to clear the sums after each
sample interval. The 3d accel values were only cleared if there was a
full IMU, not for devices with only an accelerometer like
EasyMotor. The motor pressure sum was never cleared.

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