cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

Joystick: suggested interface improvements

Open ES-Alexander opened this issue 2 years ago • 4 comments

This is a single page view: image image image

  • [ ] Global axes protocol settings
    • [ ] #644
      • Protocol selection
      • Message frequency
    • [ ] Message type
  • [ ] MAVLink/Cockpit/modifier icons for joystick functions
    • I've used % symbols for modifier here because I think of it as the mod(ulo) operator from Python, but we could choose something else if we can think of something clearer / more intuitive
      • one alternative is using typical symbols based on the modifier name, although I quite like the sense of "groupiness" provided by having a consistent symbol for the different modifiers, just with different numbers
  • [ ] Intuitive button icons for importing and exporting joystick and functions mappings
    • Clicking these should open a dialogue that allows choosing whether to import/export from/to the vehicle's onboard computer or the device running the Cockpit frontend (relevant to #556)
    • Base functionality and interim/alternative UI in #630
  • [ ] Support modifier keys (advanced version of #453)
    • first 4 modifier keys are called SHIFT, ALT, CTRL, and META by default, and after that they're just numbered / use custom names (or disallowed?)
    • we don't support multiple modifiers at once, but it is allowed to press a modifier and multiple other non-modifier buttons
      • for ease of implementation, pressing a modifier while a different one is held should override the currently active modifier with the new one (i.e. modifiers activate when pressed, and deactivate when released or when a different modifier is pressed)
    • [ ] Display tabs for modifier keys
      • pressing a button assigned to a modifier key moves to that tab, but tabs can also be changed by clicking
    • [ ] Functions mapping table for advanced configuration (/if there isn't an SVG)
      • should likely be hidden by default, in a collapsible "advanced configuration" section
      • columns are modifier keys, rows are (virtual) joystick button numbers
      • each column can be optionally counted as a MAVLink MANUAL_CONTROL shift button, except the REGULAR column
      • pressing a button/modifier-combination highlights the corresponding table cell(s), as well as the column+row headings
        • since simultaneous modifiers aren't supported only one column should ever be highlighted at a time, but several rows can be highlighted at once (corresponding to the current modifier as well as any non-modifier buttons that are held down)
      • clicking a table cell allows changing the assigned function
      • if a cell is assigned as a modifier key, the rest of the row is greyed out
      • MAVLink MANUAL_CONTROL button function assignments also show the BTNn "n" number they're assigned to, or "Sn" for shifted button functions
        • we may want a toggle switch somewhere to turn this on/off, since users likely don't care about it most of the time
    • adding a new modifier key is possible by clicking the + button in the tabs or on the right of the table
  • [ ] Support multi-joystick prioritisation
    • show as tabs on the side
    • allow dragging joysticks to prioritise
      • by default only the top priority joystick has MANUAL_CONTROL outputs enabled
        • see #615 for some context
      • if multiple joysticks enable MANUAL_CONTROL, outputs are determined based on prioritisation (e.g. both can press buttons, and control axes, but if one they're fighting over the state of a particular button function or axis then the higher priority one wins)
    • if keyboard and mouse support are added, they could be considered as alternative joysticks, subject to the same prioritisation/mixing (we could rename the section to Control Input Devices or similar)
    • one input device could conceivably activate a modifier function to affect the outputs of another input device, if it is configured to have control over a modifier function that the other device uses
      • this would allow a 'teacher' to have a physical switch on their controller that disables input from a 'student'
      • provides more native input mixing/sharing/coordination options

ES-Alexander avatar Dec 05 '23 01:12 ES-Alexander

Those are some really good ideas. I will implement at least the tabs and import/export buttons for now.

I specially love the icons in the functions names. They turn everything much more intuitive. And I'm fine with the %.

rafaellehmkuhl avatar Dec 05 '23 13:12 rafaellehmkuhl

Note: @Williangalvani is working on some potentially related/overlapping UI elements in BlueOS focused on sensor+peripheral calibration and configuration. We should probably try to create similar UIs so the two applications feel consistent/related.

ES-Alexander avatar Dec 15 '23 00:12 ES-Alexander

Note: @Williangalvani is working on some potentially related/overlapping UI elements in BlueOS focused on sensor+peripheral calibration and configuration. We should probably try to create similar UIs so the two applications feel consistent/related.

Can you get some examples?

rafaellehmkuhl avatar Dec 15 '23 12:12 rafaellehmkuhl

Can you get some examples?

You’ll have to ask Will - I was talking to him about it, so I’m not sure if the code is committed/public yet.

ES-Alexander avatar Dec 15 '23 13:12 ES-Alexander