Break out rc interpolation as a separate task and run before pid controller and motor...
commitfdee2e52283c7578f5e41a2680eea4bcc4c8a01f
authorBruce Luckcuck <github@etracer.net>
Wed, 16 May 2018 14:12:37 +0000 (16 10:12 -0400)
committerBruce Luckcuck <github@etracer.net>
Wed, 16 May 2018 14:21:29 +0000 (16 10:21 -0400)
treee89e3b6e016a86e32cbd9d875bf3be0283c033bc
parente405e41d0ca18c434ee9a058232af520fb7b8f7e
Break out rc interpolation as a separate task and run before pid controller and motor update
Fixes an issue with motor "spikes" when rc interpolation was enabled for throttle. The problem was that the smoothing was happening too late in the sequence and the earlier process subTaskMotorUpdate() would use the unsmoothed throttle value in the mixer if new rx data had come in between the last and current PID loop.  Also because the setPointRate was calculated at the end of the smoothing, the PID controller would always be using the value from the previous loop iteration.
src/main/fc/fc_core.c