Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add support for haptic feedback on Pico controllers #2932

Merged
merged 2 commits into from
Mar 9, 2020
Merged

Conversation

MortimerGoro
Copy link
Contributor

Fixes #2630

Depends on #2931

if (mControllerManager != null) {
float intensity = 255.0f * Math.max(Math.min(aIntensity, 1.0f), 0.0f);
int durationMs = Math.round(aDurationSeconds * 1000);
ControllerClient.vibrateCV2ControllerStrength(intensity, durationMs, 1 - aControllerIndex);
Copy link
Contributor

Choose a reason for hiding this comment

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

I had to swap the hands to get the correct controller to vibrate.

@bluemarvin bluemarvin merged commit 25bc08b into master Mar 9, 2020
@bluemarvin bluemarvin deleted the pico_haptic branch March 9, 2020 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support haptic feedback on Pico controllers.
2 participants