backtransition when taking over manual control #20620
Closed
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.
From https://discord.com/channels/1022170275984457759/1039594203149238332 @MaEtUgR @sfuhrer
Describe problem solved by this pull request
With #17404, a change was introduced in what happens when you take over manually with the RC from an automatic flight mode. Previously, the transition switch would be checked and the drone would transition accordingly if needed. Now the transition switch is ignored. Meaning for example that if the drone is flying in FW mission mode and you take over in Position mode with the transition switch already in MC mode, the drone will continue to fly in FW mode, and not according to the switches on the RC.
For some use cases (including ours, obviously), this is undesired. If we have to take over manually, it's because of a emergency situation, in which we want to switch to MC asap. (Though for most use cases the new functioning is arguably better.)
Describe your solution
When a switch to a manual flight mode is detected, a back transition is started immediately.
Describe possible alternatives
Don't merge this if it's not deemed better.
Test data / coverage
I forgot to activate permanent logging when bench testing. I will update the descriptions with logs once I get back to my test bench.