|
Re: XBox controller
My team used Xbox 360 controllers last year. In our code, we used Joystick.GetRawAxis() and tied it to a float. When we called RobotDrive.ArcadeDrive(), we handed it our floats.
Code:
float driverLeftY = driverXbox.GetRawAxis(2);
float driverRightY = driverXbox.GetRawAxis(5);
robotDriver.ArcadeDrive(driverLeftY, driverLeftX);
If I recall correctly, we ended up in the same situation as you, having trouble with GetAxis not working with an xbox controller. Handing it the GetRawAxis floats worked, and we ended up running with it.
If you're having trouble with any of the button or axis setups, this should help.
__________________
Team Resume
562 "S.P.A.R.K." - Student Programmer 2008-2011, Field Coach 2011
3623 "Terror Bots" - Technical Mentor, Field Coach 2012 - Present
Volunteer Resume:
BattleCry@WPI 12, 13, 15, 16 - Queuing
BattleCry@WPI 14 - Field Reset
Granite State District Event 2014 - Team Queueing
NEFIRST District Championships '14,'15,'16 - Team Queuing
|