Go to Post If I can make a comeback, so can you. - Warren Boudreau [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-01-2013, 15:29
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: 543
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
Using XBOX controller D-PAD

Ive been trying this for a while but it never works... what ive been told is that they are via get raw button and the button is their directional axis

-1 = none
0 = top
45 = topright
...

but it never works and i cant figure out why. Am I doing it wrong or is that misinformation?
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2013, 16:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using XBOX controller D-PAD

I don't have experience with the Xbox controller, but I've used Logitech gamepads and a couple of similar generic ones. The D-pad is read on axes 5 and 6, one axis for horizontal action and the other for vertical.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2013, 16:20
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Using XBOX controller D-PAD

The xbox controllers use 1 more analog axis than the DualAction's, so there aren't 2 more axis for D-pad h and v. Only horizontal is available, via axis 6. -1 is one way, +1 is the other, 0 is center. There are only three states. You cannot access d-pad vertical. This is because two triggers (L2 and R2) are mapped to axis 3 (positive is one trigger, negative is the other trigger, they are summed so you can't use both at once) on the xbox and F310 controllers.

Since the Logitech F310 is the same as an xbox controller in software, it is likely the same. I have not verified this though. Note: We've found the F310 is higher quality than the Xbox stick, as the joysticks return to center better and the springs 'feel' better. It's also symmetrical, which many of our drivers prefer (even though it doesn't matter with Halo drives). All of the button maps are identical to the xbox in software.

The Logitech dual action uses button inputs for L2 and R2, so the two joysticks are axis 1-2 and 3-4, and the D-pad is axis 5 and 6 (horiz and vertical respectively, -1, 0, +1 tri-state).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #4   Spotlight this post!  
Unread 16-01-2013, 18:33
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: 543
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: Using XBOX controller D-PAD

So how does edu.wpi.first.wpilibj.buttons.Button use the axes? (but theyre input only takes commands...)
Reply With Quote
Reply


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 20:56.

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