Plane: Do not apply minimum throttle during SLT VTOL airbrake #28329
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.
Summary
This PR ensures that the
bool SLT_Transition::active_frwd()
check does not return true during a back-transition airbrake.Details
The existing code would cause
active_frwd()
to return true during a back transition.In turn,
servos.cpp:553
would trigger:and would set the minimum throttle to the forwards transition throttle:
THR_TRIM
orTKOFF_THR_MIN
.This would lead to undesired increase in airspeed and eventually altitude during the back transition.
The TECS minimum throttle can be used as a proxy to see the effect of that setting.
This is a snapshot during the airbrake phase.
Before:
![image](https://private-user-images.githubusercontent.com/3149996/374109599-14e8924d-9079-4b5e-bd8e-477d9db443f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzg5NjAsIm5iZiI6MTczOTM3ODY2MCwicGF0aCI6Ii8zMTQ5OTk2LzM3NDEwOTU5OS0xNGU4OTI0ZC05MDc5LTRiNWUtYmQ4ZS00NzdkOWRiNDQzZjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMT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