cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

frontend: joystick: add a "reverse" mode

Open ES-Alexander opened this issue 1 month ago • 0 comments

Current behaviour

Controls are currently fixed to "forwards" style. That's fine for most users, but if a vehicle is reversible it can be convenient to reverse the controls.

That's technically already possible via a workaround, by duplicating a functions mapping and swapping just the desired axes, but then it's awkward to swap between them (they need to open the joystick configuration to do so, instead of just pressing a button), swapping mappings is currently confusing, there's needless extra work to keep the button mappings in sync, and it loses the user a mapping set.

Expected or desired behaviour

Add a "reverse" Action, to reverse the user's motion control inputs:

  1. A minimal implementation could just directly reverse all the axis mapping ranges except for Z, although there may be some confusion if that change is persistent across reboots.
  2. To make it more configurable the reversing status could be defined by a boolean data-lake variable (with optional value persistence?), which would then also integrate nicely with #1759, in future development.
    • Variables can be toggled, or controlled as momentary switches (e.g. while holding a joystick button), which opens some additional usage possibilities
    • This has the side benefit that it could be used to trigger an automatic switch between Views (e.g. to one with a rear-facing camera as the main display), via a custom Action
  3. If we want to provide more control to the user we could allow them to select which axes are "reversible", as part of the joystick configuration interface.

Prerequisites

  • [x] I have checked to make sure that a similar request has not already been filed or fixed.

ES-Alexander avatar Nov 12 '25 10:11 ES-Alexander