Skip to content

Conversation

@KangarooKoala
Copy link
Contributor

#8385 changed gamepad types to follow SDL_GamepadType, so 20 and 21 (previously kHIDJoystick and kHIDGamepad, respectively) are no longer valid constants. This meant that after leaving the disconnected state of the sim GUI, GamepadType.getGamepadType() would return null (since it didn't match any constants). Since there aren't analogous generic joystick and gamepad constants anymore, this PR changes GlfwSystemJoystick and KeyboardJoystick to both unconditionally report as kStandard.

This also updates the GenericHID.SetRumble doc comment to reflect the two new types of rumble and changes some switch labeled statement groups to use switch rules instead. If we want to keep on using switch labeled statement groups (e.g. for consistency with C++, though GenericHID::SetRumble currently uses if-else), then I could drop the last change- I just made it since GenericHID.setRumble() previously used switch rules and general switch rules are nice since there's no risk of fall-through.

@KangarooKoala KangarooKoala requested review from a team as code owners December 2, 2025 03:13
@github-actions github-actions bot added component: wpilibj WPILib Java component: wpilibc WPILib C++ 2027 2027 target labels Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2027 2027 target component: wpilibc WPILib C++ component: wpilibj WPILib Java

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants