Preventing USB controllers from swapping USB ports?


#21

We added shuffleboard booleans for anytime an operator controller button is pressed and one for any time a driver controller button is pressed. It let’s our drive team not have to switch tabs on the DS to be able to see if they both have the right controllers.


#22

We had this issue at the Week 1 competition at Del Mar. Instead of driving, our elevator started going up and we ended up getting a penalty. Definitely check before the match starts. We will look into the suggestions.


#23

At our meeting last night we seemed to have solved the port swapping problem. Final testing tomorrow.


#24

Hey ToddF if you still need help with this I would be more than willing… This way if they accidentally are swapped you just press a button and it flips the directions/sides


#25

You may be misunderstanding our problem. We are experiencing the controllers switching the USB ports they are connected to, not swapping x and y axes. Are you saying you have found a way so when you press a button on a controller, the controller on USB1 switches to USB0 and vice versa?


#26

@ToddF yes I misunderstood, however you could still program a button to swap the controller port numbers.

What is your two controllers? are they two drive controllers (like tank drive) or is one like arcade drive and the other a xbox controller? what are the two controllers used for?


#27

I think I see in your OP that they are two game controllers… are they identical controllers? also do you have a command bot or an iterative bot program?


#28

Now that we’ve solved our problem, we don’t need to, but I’m sure it would be helpful to some other teams if you’d post a video demonstrating how to do this.


#29

okay sounds good! Let me know if you still need it, but it sounds like you are all set. Also, that is a good idea, I may make a video or at least a post here on chief delphi for it…


#30

An electrostatic discharge (static spark) from your hand can easily cause the cheap processor in a keyboard or mouse to restart, which looks like a disconnectect and reconnect on USB. I suspect that could happen with joysticks and game controllers too, and might be more likely with cheaper, off brand ones. In linux you can see USB connect and disconnect events in the system log; not sure about windows.

In addition to suggestions above, try to touch somthing metal before grabbing the controller. Maybe even provide a grounded metal strip on your driver station console.


#31

After hours of testing, it looks like we have the problem licked. Here’s how to keep your controllers from swapping USB ports.


#32

This is correct even rebooting DS and laptop