Plane: tailsitter: use true hover throttle for VTOL transition and report in VFR_HUD #15811
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.
Fixes #15798
This changes to calculate the true hover throttle in back transition, the current behavior is to directly apply the hover percentage. This percentage is only the valid hover throttle when the copter expo, spin and pwm min and max are applied. To allow this
AP_Motors
functionthrust_to_actuator()
is moved to public.This is a example transition on master. Transitions to mid stick Qstab should be the hover throttle. Showing the left and right throttle output PWM
The small step is direct application of hover throttle percentage. The large step is the change to the true hover throttle in Qstab.
Now with this patch.
The throttle jumps directly to the true hover throttle for the transition, there is then a small step due to the throttle position in Qstab.
This also fixes the throttle value sent back over VFR_HUD, current master does not update the throttle value during transition, your just left with the last valve from a VTOL mode.
Master (the square dip):
![VFR-hud before](https://user-images.githubusercontent.com/33176108/99147882-3e6c0980-267c-11eb-8610-14ce599d0baa.png)
This patch:
![VFR-hud after](https://user-images.githubusercontent.com/33176108/99147884-43c95400-267c-11eb-9b1f-25fccf69340d.png)
The big jump is due to the above patch, were reporting as the true throttle output because its not going via AP_Motors, once AP_Motors is active the throttle drops again.