Skip to content

Conversation

marcmarmir
Copy link

#298

Add support to game_controller_node for sending rumble effects to left and right rumble motors individually.

id field in JoyFeedback message now specifies which motor to rumble:

  • id: 0 both motors (matches current behaviour)
  • id: 1 left (LF) motor
  • id: 2 right (HF) motor

intensity_left_stamped_ and intensity_right_stamped_ store the value and timestamp of the most recent rumble command on that motor. Calls to SDL_GameControllerRumble() set rumble intensity values for both motors. Now, if a callback is triggered for a left-only or right-only rumble message, the node checks whether the other motor should still be rumbling. If so, it re-uses its previous intensity value, and otherwise sets its intensity to 0.

@marcmarmir marcmarmir force-pushed the add_left_right_game_controller_rumble_channels branch from 4472d7d to 83ea838 Compare February 20, 2025 18:32
@marcmarmir marcmarmir force-pushed the add_left_right_game_controller_rumble_channels branch from 83ea838 to b9a763e Compare February 20, 2025 18:48
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