Homepage Forums RetroPie Project Everything else related to the RetroPie Project No J0 – YAJSQ – Yet Another Joystick Question Reply To: No J0 – YAJSQ – Yet Another Joystick Question

#5759
bmanske
Participant

In reality the reload did nothing to solve the problem. Reading through the man page for xboxdrv it says in the -EVDEV option (refering to use of xboxdrv to work with non xbox controllers) that the driver can leave joystick devices around when setting up the controllers. The old devices can be deleted and the new devices renamed.

Looking at /etc/init.d/xboxdrv I saw a workaround. It looked like this workaround was for a 4 controller setup and if devices 0-3 were old then devices 4-7 would replace them. What I needed was a solution for my one controller.

This is not a complete solution for the problem. If I boot and the controller comes up in a strange state then it doesn’t automatically reset the joystick. What it does is leave the joystick devices in a state to that when I unplug and plug in my controller then it attaches correctly.

It SHOULD work for up to 4 controllers but I only have one so it hasn’t been tested for 2-4.

The other improvement I made was to allow the choice of wired or wireless controller in the /etc/default/xboxdrv file. This choice can be made for each controller individually.

I changed the LED for the 4th controller on a 4 controller setup. I moved the code for run-time checking of the parameters in the defaults file into the do_start to simplify the signaling of an error.

I’m attaching my files below and hope that it helps out. Let me know if there are any questions or ideas for improvement.