Joystick: allow axis protocol configuration
Currently we forcibly send MAVLink MANUAL_CONTROL messages at a fixed rate, even though many vehicles don't support them, and some users may wish to change the frequency. It would be useful to allow turning that off and/or using some other protocol options for the motion control axes.
The most intuitive approach I can think of is providing a dropdown for the "axes protocol" which (for now) allows selecting between None, MAVLink MANUAL_CONTROL, and MAVLink RC_CHANNELS_OVERRIDE, together with a frequency selector/slider for the message rate (when the protocol is not None). That also leaves the UI open for additional protocols later, including non-MAVLink ones if that becomes relevant.
There is a bit of complexity involved though, because if the axes protocol is set to anything other than MANUAL_CONTROL then the corresponding button functions shouldn't be available to the user (since the messages won't be being sent). Perhaps we can allow them to stay selected (so they don't get unmapped), but just grey them out and/or strikethrough them to make it obvious they won't actually work.
Agree on most things.
And just to get one point correct, we only support MANUAL_CONTROL today, not RC_CHANNELS_OVERRIDE.
And just to get one point correct, we only support
MANUAL_CONTROLtoday, notRC_CHANNELS_OVERRIDE.
Yes - I’m suggesting that RC_CHANNELS_OVERRIDE is a logical “next” protocol for us to support, which also illustrates why a dropdown would be useful rather than just a toggle switch between None and MANUAL_CONTROL.
And just to get one point correct, we only support
MANUAL_CONTROLtoday, notRC_CHANNELS_OVERRIDE.Yes - I’m suggesting that
RC_CHANNELS_OVERRIDEis a logical “next” protocol for us to support, which also illustrates why a dropdown would be useful rather than just a toggle switch between None andMANUAL_CONTROL.
Got it. Seems reasonable.
Combining #1658 and #1759 will likely make this at least possible via workaround.