RC_Channel: optional mount retract logic inversion #30875
+13
−1
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.
Something popped up after flight-testing #30810
If the mount is set up in a way that the default mode is
MAV_MOUNT_MODE_RETRACT
, the RC switch becomes unusable since it can either retract or go to the default mode (which is again retracted).This change flips the switch logic when the mount is retracted by default and when the switch is high the mount goes to RC targeting. The idea behind that is that since the default parameter is used up a reasonable guess is that since the user uses RC to open/retract the mount, they are likely having a transmitter-only (or primarily transmitter) setup. The MAVLink code path is unaffected.
Tested in SITL.