Fix throttle angle correction when smoothing throttle; reduce processing overhead
commit5cd886017db11f5b09f1a7a651c042997fe1b6c0
authorBruce Luckcuck <github@etracer.net>
Thu, 28 Jun 2018 14:39:21 +0000 (28 10:39 -0400)
committerBruce Luckcuck <github@etracer.net>
Thu, 28 Jun 2018 19:56:01 +0000 (28 15:56 -0400)
treebec4c7fa8f288fa5417e13dc31ff097888f9402d
parente260c37be3b45c26659281d4f4d8489a80dfc08a
Fix throttle angle correction when smoothing throttle; reduce processing overhead
Change the logic to not modify rcCommand directly and instead apply the additional throttle directly in the mixer.

Also move the logic to the attitude task instead of having it calculate in the PID loop. The logic relies on an angle that's only updated in the attitude task so there was no point in running the calculation every PID loop.
src/main/fc/config.c
src/main/fc/fc_core.c
src/main/flight/imu.c
src/main/flight/imu.h
src/main/flight/mixer.c
src/main/flight/mixer.h
src/test/unit/flight_imu_unittest.cc