![]() |
|
#1
|
|||
|
|||
Also, the button codes appear to be wrong.
I get different codes from the sensor down than what the documentation states: dinput.XBOX_BUTTON_START reads as a 4, while the left shoulder button reads as a 4 and the start button reads as a 7. |
#2
|
|||
|
|||
Yeah, the documentation is not very clear. You actually need to use the <dinput>.getXboxControllerList() to get a list of Xbox controller objects that provide the additional methods. They are different than the standard joystick objects created through <dinput>.addJoystick().
Here is a sample script that gets all the detected Xbox controllers and displays a config window for them: Code:
import viz import vizconfig viz.go() dinput = viz.add('DirectInput.dle') for sensor in dinput.getXboxControllerList(): vizconfig.register(sensor) vizconfig.getConfigWindow().setWindowVisible(True) |
#3
|
|||
|
|||
Great, that also fixed the button mapping problem.
~George |
#4
|
|||
|
|||
What about the analog sticks for the callbacks?
Has that been phased out and now I just use a timer to read the values? Before there was a move and a twist method. |
#5
|
|||
|
|||
Also, what about the dead zone?
Doesn't seem to have an effect when set on the XBox controller. If I poll the device using the getLeftStick() I still get a value less than the dead zone. Do I have to manually test for this? |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
XBOX360 USB controller intermittently working | fivel_lab | Vizard | 2 | 01-26-2015 07:09 PM |