|
Re: XBox controller
Quote:
Originally Posted by ekapalka
So does that mean we don't vave to use
Code:
leftStick = new Joystick(1);
rightStick = new Joystick(2);
or that in addition to the code you suggested? Thanks for your reply! I really appreciate it!
|
You still need to create the joysticks for GetRawAxis() or GetRawButton() to work. If you do, it won't know what you're asking for!
Toa, our reasoning for using the floats was a double whammy type deal; we added a small deadband to the controller by keeping an eye on the values. We were aware of the issue that the robot could potentially move without a human interacting with the controller due to the minuscule difference between 0 (dead stop) and .25 (moving) on the xbox controllers. This also solved the issue with GetRawAxis() freaking out in the main loop.
__________________
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
|