|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Joysticks not reading
are you trying to deloy your code with eclipse? That might not work at all, go back to netbeans
|
|
#2
|
||||
|
||||
|
Re: Joysticks not reading
Quote:
After a quick check, the Joystick instance is non-null, it is being created, but it is only returning 0's. I am using a red Afterglow Xbox 360 controller. Last edited by Poseidon5817 : 12-05-2015 at 18:54. |
|
#3
|
|||||
|
|||||
|
Re: Joysticks not reading
Have you tried printing values in autonomous init? robot init? just to have a look if your code actually runs
![]() |
|
#4
|
||||
|
||||
|
Re: Joysticks not reading
robotInit() runs. I haven't tested autonomousInit(). It still works in old projects but won't work in this one.
Last edited by Poseidon5817 : 12-05-2015 at 19:51. |
|
#5
|
|||||
|
|||||
|
Re: Joysticks not reading
As I recall, the axis numbers changed from 2014 to 2015. Oh well, joystick axis 4 appears to be the horizontal on the right joystick both years.
Is your controller perhaps mapping to a different number than control 1? Have you tried 0 or 2 as the argument to new Joystick() in robotInit? Actually, even easier as you seem to have the hardware, you could try plugging in "multiple different controllers" at the same time and see if any of them works. |
|
#6
|
||||
|
||||
|
Re: Joysticks not reading
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: Joysticks not reading
also, the joystick mapping start at 0, so try changing your joystick port on your DS in the usb section
|
|
#8
|
|||||
|
|||||
|
Re: Joysticks not reading
Did you back-load (or do you still have) the 2014 driver station software installed on your classmate/laptop, or are you running 2015 driver station? I understand that there were significant protocol changes from 2014 to 2015.
|
|
#9
|
||||
|
||||
|
Re: Joysticks not reading
I am running the 2015 DS with the option for 2014 DS and FMS mode selected.
|
|
#10
|
||||
|
||||
|
Re: Joysticks not reading
Quote:
From the wpilib screensteps documentation: Quote:
|
|
#11
|
||||
|
||||
|
Re: Joysticks not reading
Regardless, the joystick reads in our main program (although axis mapping is messed up), but not this one.
|
|
#12
|
|||||
|
|||||
|
Re: Joysticks not reading
By "our main program", do you mean the driver station? If so, then that's what Pault was saying would happen. It appears that the legacy mode is only for connections via the FMS, not direct connections. Here, it's not FMS that is the old version, but the robot computer. I believe that you will have to run the 2014 driver station or a work alike.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|