Quote:
Originally Posted by kinganu123
Use the driver station to find the raw axis values of the individuals joysticks (it's on one of the tabs on the bottom left hand side). Then, just call getRawAxis() on that axis you find.
Also, I'm sure if you look around on chiefdelphi, you'll find that people have already posted up their xbox class.
|
Could I use this picture
http://team358.org/files/programming...rolMapping.jpg for the values or do I need to check the actual readings?
Code:
boolean buttonPressedForwardSpike = false; // these are in init.
boolean buttonPressedForwardVictor = false; // init
if (xbox.getRawAxis(5)) { // 5 being the Y axis on right stick
spike1.set(Relay.Value.kForward);
spike2.set(Relay.Value.kForward);
buttonPressedForwardSpike = true;
} else if (buttonPressedForwardSpike = true) {
spike1.set(Relay.Value.kOff);
spike2.set(Relay.Value.kOff);
buttonPressedForwardSpike = false;
}