I’ve connected the XRP Beta to my Windows 10 driver station over USB. Running the XRP Code Editor gamepad example doesn’t spin the wheels, and the above code prints “-0.0” over and over.
I’ve tried WASD and multiple gamepads, all of which are detected and work by the Hardware Tester .
Other axes also return -0.0 and buttons are always false.
Currently the gamepad only works when the XRP is connected via bluetooth. Is there a specific use case you had for using gamepad control while connected via the USB?
More info directly from the XRPCode changelog (in case it helps anybody):
Version 1.2.2
Gamepad support
After updating the XRPLib to version 2.1.3 or greater you can use a gamepad with XRPCode to drive your XRP. The Blocks palette has been updated with gamepad blocks.
To drive your XRP you will need a program that responds to the gamepad interactions. There is a very small program in the XRPExamples directory. Be creative and create your own for different types of driving.
We use the standard Web Gamepad support and recognize only one controller. If you want to know if your gamepad will work you can go to this website that will test if your gamepad is compatible with the web browser.
If you don’t have a gamepad you can use the keyboard. For the left joystick use WASD keys and for the right joystick use the IJKL keys. The number keys 1 - 0 are used for the buttons, in the same order as the pull down on the button gamepad block. There are no keys for the D-PAD.