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>
Thu, 22 Oct 2020 04:33:59 +0000 (21:33 -0700)
commitc5796f686b1bf9e4effd7f9d8dca2ee5d7a38a16
tree9bda61224f8c7d20bbd28e267fcb306d8d3e959a
parentf10009b07b651f69014ac5608f3ca29bce874c24
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