Skip to content

Fix drifting in the joystick triggers#2399

Merged
rafaellehmkuhl merged 2 commits intobluerobotics:masterfrom
rafaellehmkuhl:fix-joystick-focus-drift-problem
Feb 13, 2026
Merged

Fix drifting in the joystick triggers#2399
rafaellehmkuhl merged 2 commits intobluerobotics:masterfrom
rafaellehmkuhl:fix-joystick-focus-drift-problem

Conversation

@rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Feb 6, 2026

This patch fixes the problem of drifting trigger inputs (non-zero values on the joystick triggers when not pressed).

To accomplish that it uses an updated version of node-sdl which allow for the initial joystick/controller calibration to be bypassed, and adapts to the new range and behavior.

This patch needs this change to be accepted on node-sdl, and a consequently update of the lib version on our side. As the upstream update is taking longer than we are able to wait, I've built it in my fork and pointed our project to use the forked build.

How to test it

  1. Start any Cockpit version from 1.17 with a joystick trigger half pressed.
  2. Open /menu/tools/data-lake and see how the focus/zoom (depends on your joystick profile) value is far from zero
  3. Now install the version from this PR and do the same. The value should be zero (or very close, since the joystick can have a small shift from zero)

Fix #2355

@rafaellehmkuhl rafaellehmkuhl changed the title Fix drifting in the joystick triggers [WIP] Fix drifting in the joystick triggers Feb 6, 2026
@rafaellehmkuhl rafaellehmkuhl force-pushed the fix-joystick-focus-drift-problem branch 2 times, most recently from ea1cb7b to 680af28 Compare February 12, 2026 20:37
We need the forked version with the fixes to the initial joystick calibration sooner than we can expect for the upstream to be updated.

This change should be reverted once the change is accepted upstream.
@rafaellehmkuhl
Copy link
Member Author

rafaellehmkuhl commented Feb 12, 2026

@ES-Alexander @ArturoManzoli I need you guys help testing this one to make sure its fixed indeed. I've included instructions in the PR. Arturo if you could test it on both Linux and Windows that would be great (this way we make sure my build is working correctly for all versions).

I'm putting this one in the fast-track as its a must for the RadCam release.

@rafaellehmkuhl rafaellehmkuhl changed the title [WIP] Fix drifting in the joystick triggers \Fix drifting in the joystick triggers Feb 12, 2026
@rafaellehmkuhl rafaellehmkuhl changed the title \Fix drifting in the joystick triggers Fix drifting in the joystick triggers Feb 12, 2026
@rafaellehmkuhl rafaellehmkuhl marked this pull request as ready for review February 12, 2026 21:40
@rafaellehmkuhl rafaellehmkuhl added the fast-track Solves an important user complaint - only block for major concerns label Feb 12, 2026
Copy link
Contributor

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was painful to test, but confirmed working properly - nice work!


For future reference (from some internal discussion / debugging):

  • Built binaries without defined versions are not re-installed/built with yarn install / yarn dev:electron
    • yarn upgrade sdl can directly get the changed SDL binary
    • yarn install --force can more generally ensure all the packages are using their specified version
  • To run a downloaded app from a PR artifact, the macOS gatekeeper needs to be disabled with xattr -d com.apple.quarantine /Applications/Cockpit.app (or whatever application path you're using)

Copy link
Contributor

@ArturoManzoli ArturoManzoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tested and working very well.
Tested on windows and linux

@rafaellehmkuhl rafaellehmkuhl merged commit 929e143 into bluerobotics:master Feb 13, 2026
11 checks passed
@rafaellehmkuhl rafaellehmkuhl deleted the fix-joystick-focus-drift-problem branch February 13, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Solves an important user complaint - only block for major concerns

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Focus drift in 1.18 beta2

3 participants

Comments