-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joystick: Support extended MANUAL_CONTROL
message (buttons2
+ s
&t
axes)
#559
Joystick: Support extended MANUAL_CONTROL
message (buttons2
+ s
&t
axes)
#559
Conversation
5063bfe
to
3b9bfb9
Compare
Since this is based on an optional extension of the MAVlink protocol, we should likely support both options, with a toggle-switch to go between 4 axes + 16 buttons and 6 axes + 32 buttons, located in the same place as the controls suggested in #644 (likely above the tabbed section from #617, since these settings are global and not per-joystick). If we do make this optional, we can probably merge it in already. The extension has been around long enough that MAVLink2REST probably includes it already, and the latest ArduSub |
buttons2
field in the MAVLink ManualControl messageMANUAL_CONTROL
message (buttons2
+ s
&t
axes)
Humn, didn't thought about people going back and forth. Should we support it? In this case, what do we do if they opt out after opting in? Clear the buttons/axes that use extra slots? PS: to merge this, we have to rebase it over the last joystick pipeline update and solve te conflicts. |
Clearing/disabling would indeed be the most straightforward implementation I can think of, perhaps with a warning/confirmation popup first with an option to save their current joystick profile as a backup. If we want to be "smart" then the most ideal approach I can think of would be to
|
I think the most sane solution would be to just not remap anything and let the user know if 32buttons+6axis is not supported. With the possibility of creating different joystick profiles, users can just have one for each firmware, if needed. |
I believe that's what I described in step 2, although skipping step 1 would likely have issues if we do start supporting additional axes protocols (like |
Yeah... |
72ff11f
to
b07cdc8
Compare
Needs: bluerobotics/BlueOS#2295 |
8922a40
to
c1ede53
Compare
@Williangalvani added a warning on the joystick configuration page for when the m2r/vehicle does not support the extended message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested, because I'm away this week, but here are a couple of code/language suggestions.
If there isn't already one I still think it would be useful to have a user option to toggle extended on/off (potentially enabled as an override via a checkbox), to better support vehicle and firmware types Cockpit doesn't already know about (e.g. if someone has a MAVLink vehicle that's not running ArduPilot).
c1ede53
to
6b0c932
Compare
6b0c932
to
9d85896
Compare
the axis worked as expected here. I couldn't get the warning to show by using Sub 4.1.1 |
…AVLink `MANUAL_CONTROL` protocol
…VLink `MANUAL_CONTROL` protocol
In the case all the button slots are already taken, we try to change the last button slots first, as in the case of vehicles with 32 buttons available, we prevent changing the first 16, which are usually used by other ground control stations, preventing clashs.
Wrapper library for `fetch`, with support for typescript and timeouts.
Adds timeouts and removes boilerplate code.
…k2rest/ardupilot that do not support extended `MANUAL_CONTROL` message
9d85896
to
64f876a
Compare
all good now, I think I had an earlier version checked out already. re-rested and it seems to be all good. |
Needs
mavlink2rest
andardusub
versions that support it. Currently, both BlueOS and ArduSub have support for it on master, but not on stable versions.Cockpit will keep working for controlling the vehicle even if one of those two do not support the extended messages, and will just use the non-extended fields (buttons2 and x+y+z+r).
Fix #182