Copter: tradheli's implement spool logic #10212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a subset of the contents of this PR from bnsgeyer. The main purpose of this PR is to make TradHeli's "spool logic" interface and implementation more consistent with Multicopters. We hope this will reduce the number of tradheli specific exceptions in the main code and make it easier to keep TradHeli up-to-date with new Multicopter features.
To provide some background, both TradHeli's and multicopters already implement "spooling" which means gradually increasing or decreasing the maximum turn rate of the motors but the implementation is very different. Even after this PR is merged, the parameters holding the different maximums are different but it is still a step in the right direction.
Multicopter parameters / TradHeli parameters:
The major changes this makes to master are:
The TradHeli changes have been extensively tested by @bnsgeyer in RealFlight. There should be no functional changes to multicopters as a result of this PR.
As a side note there will be a follow up PR which makes further changes to the Copter vehicle code to make better use of the actual spool state. This including delaying the disarm until the main rotor has spooled down.