ricardoquesada / bluepad32

Bluetooth gamepad, mouse and keyboard support for ESP32 and PicoW
https://bluepad32.readthedocs.io/
Other
566 stars 59 forks source link

[Bug]: thumbR button not working #38

Closed davidxgames closed 1 year ago

davidxgames commented 1 year ago

What happened?

A bug happened! thumbR button not working working:

            if (myGamepad->l2()) {
                myGamepad->setRumble(0xc0 /* force */, 0xc0 /* duration */);
            }
       not working:
            if (myGamepad->thumbR()) {
                myGamepad->setRumble(0xc0 /* force */, 0xc0 /* duration */);
            }

Bluepad32 Version

3.7.2 (latest stable)

Bluepad32 version custom

Example: Using Git develop branch commit hash #xxxxxxx

Bluepad32 Platform

Arduino ESP-IDF

Platform version

ESP-IDF v4.4.4

ESP32 chip

ESP32

ESP32 board

ESP32 WROOM DevKit

OS

Windows

Relevant log output

No response

Relevant sketch

No response

ricardoquesada commented 1 year ago

which gamepad are you using?

davidxgames commented 1 year ago

which gamepad are you using?

DS5

davidxgames commented 1 year ago

The button works in serial shows this, buttons: 0x0200, but it does not activate the rumble.

ricardoquesada commented 1 year ago

so the bug is that rumble doesn't work on DualSense ?

davidxgames commented 1 year ago

I already saw the problem, when the rumble function is like this it does not work

if (rumble) { if (myGamepad->r1()) { digitalWrite(RPin, LOW); myGamepad->setRumble(0xc0 /* force */, 0xc0 /* duration */); } else { digitalWrite(RPin, HIGH); } }

davidxgames commented 1 year ago

so the bug is that rumble doesn't work on DualSense ?

A thousand apologies, I already checked and the problem is how I am writing the code, thanks for answering, sorry for the wasted time.