Skip to content

Fix several joystick issues - #2820

Draft
rafaellehmkuhl wants to merge 10 commits into
bluerobotics:masterfrom
rafaellehmkuhl:fix-joystick-issues
Draft

Fix several joystick issues#2820
rafaellehmkuhl wants to merge 10 commits into
bluerobotics:masterfrom
rafaellehmkuhl:fix-joystick-issues

Conversation

@rafaellehmkuhl

Copy link
Copy Markdown
Member

No description provided.

Xbox controllers connected through XInput on Windows are exposed by the
browser without VID/PID (e.g. "Xbox 360 Controller (XInput STANDARD
GAMEPAD)"), so they resolved to the generic Unknown model. Match them by
name to a dedicated XboxController_XInput model with the standard gamepad
layout.
…oins

When a second joystick connected while forwarding was already active, the
handler returned early, skipping the main-joystick selection and the
disconnected-joystick cleanup for the rest of the event. Use `continue` so
only the redundant conflict check is skipped and the handler still finishes.
Cockpit forwards input from every connected joystick into a single shared
manual-control state, so multiple controllers fight each other. When more
than one joystick is connected and none is disabled yet, open a dialog
asking the user which one to keep and disable the others through the
existing per-model disabling mechanism. Guard against re-opening while the
dialog is already shown.
When a single joystick is connected but its model is in the disabled list,
its input is silently dropped and there is no visible hint about why. Show
a persistent snackbar pointing the user to the joystick configuration page
to re-enable it, and dismiss it automatically once the condition clears.
…bled

checkForOtherManualControlSources awaited plain fetches with no timeout, so
a reachable-but-unresponsive BlueOS could keep joystick forwarding disabled
indefinitely while the connection handler waited. Bound each request with a
2s AbortSignal timeout; on timeout it is handled like any other failure and
falls through to enabling forwarding.
The blue text was hard to read against many backgrounds. Use white to
match the standard button styling.
The table's live preview followed the first connected joystick regardless
of its enabled state, so with the first joystick disabled the table showed
a frozen (state-dropped) device and never reacted to the enabled one. Pick
an enabled joystick, and re-pick when the current selection is disconnected
or disabled.
Order the visual tab's joystick list so enabled devices appear above
disabled ones, keeping the active joystick at the top.
Xbox controllers exposed through SDL on Windows report VID 045e / PID 02ff
(the generic XInput interface), which was missing from the database and so
resolved to Unknown. Map it to the XInput Xbox model, matching how the same
controller is recognized by name in the browser build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant