Reworked ATR Tilt Speed conditions #63
Open
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.
Fix: Reworked ATR Tilt Speed conditions:
The margins originally in place to determine whether or not to use Transition Boost were before ATR Thresholds, when ATR Setpoint would constantly jump around between positive and negative when cruising. With these thresholds in place, the margins are less necessary and achieve the same effect. This fix negates the thresholds from the margins in effect, making the response the same as originally intended (unless the thresholds are larger than the original margins, then those are respected).
Additionally, depending on configuration and your current speed, there can be situations where Tilt Speed * the current Response Boost is faster than the Transition Boost speed. So for transition boost, we look at both tilt speeds and use the fastest one available, similarly to how transitions are now handled in Torque Tiltback in my other Pull Request.
The logic was also just reorganized as a whole, the original structure had unnecessary repeating logic and was slightly hard to follow. It's still a lot here thanks to the new logic, but I consolidated what I can.