Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   2 Joysticks Needed? (http://www.chiefdelphi.com/forums/showthread.php?t=112742)

James H 04-02-2013 17:50

2 Joysticks Needed?
 
2 Attachment(s)
This is our second year of FRC, so here's a little background info on what we've done so you guys can pick out if this is our fault or Labview's:

Last year we had 2 joysticks working great with no conflicts
This year we've had 1 joystick working great without conflict

When I set up a second joystick in Begin.vi, we started having problems. The joystick input for the motors got messed up when we only had one of the two joysticks plugged into the laptop. We messed around with our code for a while, but the only solution we found is plugging in the second joystick.

We're using Logitech Attack 3 Joysticks. The TeleOp code is attached

So if this is our fault, anyone have any ideas? If its not, I guess this is just reporting an issue.

Thanks,
Team 4256

Alan Anderson 04-02-2013 20:33

Re: 2 Joysticks Needed?
 
Quote:

Originally Posted by James H (Post 1227488)
When I set up a second joystick in Begin.vi, we started having problems. The joystick input for the motors got messed up when we only had one of the two joysticks plugged into the laptop.

Can you give a little more information about the problem? What are you expecting to happen, and what is happening instead?

James H 04-02-2013 20:45

Re: 2 Joysticks Needed?
 
Quote:

Originally Posted by Alan Anderson (Post 1227580)
Can you give a little more information about the problem? What are you expecting to happen, and what is happening instead?

Basically what happened is this:
I tried to run the code on our robot with only 1 joystick plugged into the computer when in Begin.vi we have 2 joysticks set up. When I enabled TeleOp, the input of the joystick was skewed on the x-axis input to about 0.32 when the joystick was centered (where the values should be 0 and 0). When we plugged in the other joystick (so now both joysticks are plugged in) it returns to normal values when at rest. As far as I can tell, it's not an issue with our code and since we are planning to use 2 joysticks shouldn't be a big problem. However, I am wondering if it is an issue we can fix or if anyone else has encountered this.

Alan Anderson 04-02-2013 22:59

Re: 2 Joysticks Needed?
 
Is the joystick x axis being nonzero when centered a repeatable phenomenon?

I suspect your joystick was off-center when it was first plugged in. It would have "calibrated" to that point, so it would have been offset from zero. Adding the second joystick could have recalibrated it when the Driver Station rescanned the USB devices.

James H 04-02-2013 23:27

Re: 2 Joysticks Needed?
 
Quote:

Originally Posted by Alan Anderson (Post 1227744)
Is the joystick x axis being nonzero when centered a repeatable phenomenon?

I suspect your joystick was off-center when it was first plugged in. It would have "calibrated" to that point, so it would have been offset from zero. Adding the second joystick could have recalibrated it when the Driver Station rescanned the USB devices.

Nope, tried that. Tried replugging it in, switching joysticks, restarting the driver station, and even calibrating with joy.cpl. It was only fixed once we plugged in the second joystick.


All times are GMT -5. The time now is 12:10.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi