Revise pid_process_denom default logic - second try
commit6c5b78951aa017444f6b6aab0002c0c02aeafe4b
authorBruce Luckcuck <github@etracer.net>
Sat, 7 Mar 2020 19:03:16 +0000 (7 14:03 -0500)
committerBruce Luckcuck <github@etracer.net>
Sat, 7 Mar 2020 19:03:16 +0000 (7 14:03 -0500)
treece871bd5ae68c8d9d713971ac349f7ec276499c4
parentc002d043563430e84ce05856927a6c29d588a26f
Revise pid_process_denom default logic - second try
This is a revision and partial revert of #9545.

While the previous version improved the behavior for non-8K gyros, it had some unfortunate side effects on the defaults and how they affected the output of the `diff`. Basically the problem is that in most cases the default value will end up getting adjusted during the first boot to work with the default low-speed motor protocol ONESHOT125. So if an appropriate default was originally set (like in the other PR) it shows up changed in the `diff` with default settings. The only workaround is to set the default to be the expected "corrected" value when ONESHOT125 is taken into account. This unfortunately reverts to the not so great behavior for gyros that have a sample rate < 8K, but that's unavoidable.

The inappropriate logic based on the `USE_` for various gyros being defined is still removed. This makes no sense in the unified targets context and was trying to determine if there's an SPI-connected gyro so that means it's going to run at 8K, but if not then it's going to be I2C and 2K, etc. This no longer makes sense.
src/main/flight/pid.c