Change gyro_overflow_detect to use filtered instead of raw gyro data
commitb49a9ec9285c25f5b3f37ef389913a467e8e3382
authorBruce Luckcuck <github@etracer.net>
Wed, 14 Feb 2018 22:50:09 +0000 (14 17:50 -0500)
committerBruce Luckcuck <github@etracer.net>
Wed, 14 Feb 2018 22:50:09 +0000 (14 17:50 -0500)
treea330eefaefac32f32f9edb846e4fce9071cf79e5
parent9da7416c30dd14d61ae7059b95ca41c3c48d0a2a
Change gyro_overflow_detect to use filtered instead of raw gyro data

Noise and momentary spikes in gyro data (particularly in 32K mode) were causing false triggering of the gyro overflow detection.

Also adjusted the trigger and reset rates slightly (approx. 1950dps and 1850dps respectively).

Optimized the gyro loop slightly by eliminating 3 floating point multiplies.

Fixed bug for gyros that may not be +-2000dps full scale.
src/main/drivers/accgyro/accgyro_mpu.c
src/main/drivers/accgyro/accgyro_mpu.h
src/main/sensors/gyro.c