Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Xbox 360 controller (http://www.chiefdelphi.com/forums/showthread.php?t=82825)

viper110110 16-02-2010 17:10

Xbox 360 controller
 
We have an xbox controller connected to the ds and it works fine for the left stick and most of the buttons. How do we get the x and y values for the right stick?

seventhapollo 16-02-2010 17:17

Re: Xbox 360 controller
 
What platform are you using (C++, Java, or LV)?

One thing to ensure is that in Game Controllers (from the Control Panel) you can see your x and y axes moving with the stick. Then it's simply a code issue.

viper110110 16-02-2010 17:28

Re: Xbox 360 controller
 
We are using java

I'm pretty sure the right stick works as I have used it at home for games. I will try what you said and see.

EHaskins 16-02-2010 19:21

Re: Xbox 360 controller
 
Code:

//definitions
Joystick stick = new Joystick(1);

//usage
float axis = stick.getRawAxis(axisNumber); //see table below for axis numbers
boolean button = stick.getRawButton(buttonNumber);

Axis indexes:
1 - LeftX
2 - LeftY
3 - Triggers (Each trigger = 0 to 1, axis value = right - left)
4 - RightX
5 - RightY
6 - DPad Left/Right

Button mapping matches Windows Control Panel>Game Pads display

Robototes2412 16-02-2010 21:50

Re: Xbox 360 controller
 
but remember to buffer the xbox controller, for this reason, im most likely gonna ditch the much-requested 360Drive on my team's robot

apalrd 16-02-2010 22:00

Re: Xbox 360 controller
 
the Logitech ps2-like controller works very well. I would recommend it to anyone having problems with the 360 controller. We are driving with one, the same one that drove us in 2008 and its still running without issue at all.

[TBT] Vampire 18-02-2010 19:42

Re: Xbox 360 controller
 
Lol that'd be so cool to do, but we don't have enough time to figure that out.
I'm super jealous >.<

EHaskins 18-02-2010 19:58

Re: Xbox 360 controller
 
Quote:

Originally Posted by apalrd (Post 921671)
the Logitech ps2-like controller works very well. I would recommend it to anyone having problems with the 360 controller. We are driving with one, the same one that drove us in 2008 and its still running without issue at all.

That one is also less than half the price of a 360 controller. I've had good luck with that one as well.


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

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