Go to Post bump. - connor.worley [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-01-2015, 20:37
ToMoPAnae's Avatar
ToMoPAnae ToMoPAnae is offline
Registered User
AKA: Patrick Fischer
FRC #3620 (Average Joes)
Team Role: Driver
 
Join Date: Jan 2015
Rookie Year: 2015
Location: St. Joseph
Posts: 8
ToMoPAnae is a glorious beacon of lightToMoPAnae is a glorious beacon of lightToMoPAnae is a glorious beacon of lightToMoPAnae is a glorious beacon of lightToMoPAnae is a glorious beacon of light
Xbox controller right analog stick not being read.

The right analog stick is not being read. We tried all axes and hands available but the left joystick is being read for both the left and right hand. It worked fine in 2014. We read the number of axes and it said that there were 6 axes available. We are using Java. The joysticks appear in the driver station and both are read correctly there, but the .get methods on the joystick object do not work for the right joystick. Has anyone else had this problem? If so, how did you fix it?

We fixed the problem. You need to use .getRawAxis(AxisNumber) and input the correct axis number. 4 for the X axis for the right joystick and 5 was the Y axis for the right joystick.

Last edited by ToMoPAnae : 17-01-2015 at 10:10. Reason: Found solution
  #2   Spotlight this post!  
Unread 16-01-2015, 20:52
AustinShalit's Avatar
AustinShalit AustinShalit is offline
Registered User
AKA: אוסטין
no team (WPILib Suite Developer)
 
Join Date: Dec 2013
Rookie Year: 2008
Location: Los Angeles/Worcester/Israel
Posts: 150
AustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of light
Re: Xbox controller right analog stick not being read.

Have you made sure your controller is working? I would check it with the Joystick Explorer: http://firstforge.wpi.edu/sf/frs/do/...stick_explorer.

You could also use the built in Driver Station tool as shown at the bottom of this page: http://wpilib.screenstepslive.com/s/...1881-joysticks

If that says that the joystick is working then maybe you could post or PM me some code.
__________________
  #3   Spotlight this post!  
Unread 17-01-2015, 07:44
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Xbox controller right analog stick not being read.

The new DS supports joysticks via DirectInput, which is the same library used last year, and it supports Input for Xbox controllers. Which type of controller is this? Does it have a switch or Mode button to select axes behavior?

Greg McKaskle
  #4   Spotlight this post!  
Unread 17-01-2015, 12:21
shindigo shindigo is offline
Registered User
AKA: Mike Parker
FRC #0102
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Somerville, NJ
Posts: 33
shindigo is an unknown quantity at this point
Re: Xbox controller right analog stick not being read.

We just ran into the same problem!!

Based on our own testing: this is the new mapping for xBox joystick axis for this year

LeftX = 0;
LeftY = 1;
LeftTrigger = 2; // Strange because triggers were one axis last year.
RightTrigger = 3;
RightX = 4;
RightY = 5;
  #5   Spotlight this post!  
Unread 21-01-2015, 09:34
NHoffmann's Avatar
NHoffmann NHoffmann is offline
Registered User
FRC #0573 (Mech Warriors)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2014
Location: Bloomfield Hills
Posts: 36
NHoffmann is an unknown quantity at this point
Re: Xbox controller right analog stick not being read.

Quote:
Originally Posted by shindigo View Post
We just ran into the same problem!!

Based on our own testing: this is the new mapping for xBox joystick axis for this year

LeftX = 0;
LeftY = 1;
LeftTrigger = 2; // Strange because triggers were one axis last year.
RightTrigger = 3;
RightX = 4;
RightY = 5;
Thank you so much! We were having so much trouble getting everything to work with the old mappings, and this explains it!
__________________
WHO ARE WE?

573!
  #6   Spotlight this post!  
Unread 21-01-2015, 10:11
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Xbox controller right analog stick not being read.

Here's a mapping:



and others: http://www.team358.org/files/program...019/#joysticks
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #7   Spotlight this post!  
Unread 21-01-2015, 10:13
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 544
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Xbox controller right analog stick not being read.

Quote:
Originally Posted by NHoffmann View Post
Thank you so much! We were having so much trouble getting everything to work with the old mappings, and this explains it!
The new driver station will show the name of all of the axes as well as their channels, I believe it is the fourth option down on the left
  #8   Spotlight this post!  
Unread 21-01-2015, 10:35
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Xbox controller right analog stick not being read.

I didn't realize that it was the number of axes that was the issue. For a bit of background on this.

DirectInput will read Xbox controllers and Xbox-like controllers and typically combines the left and right shoulder buttons into one. So one axes is spread out and the left button drives it negative and the right button positive, or vice-versa.

But The XInput drivers treat the shoulder buttons as two separate axes that only go from zero to 1.

The Logitech F310 can actually be both depending on a switch on the back.

So back to the topic. The joystick APIs are a little different. Quite a few additional features are supported, and the USB tab is key to understanding the functionality of a given joystick. If you assume it works just like last year, you may miss some functionality and/or get confused and assume a behavior change is a bug.

Greg McKaskle
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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