X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FOI.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FOI.java;h=b59b6e08b14bcf3d53a76e1a25d4b2ab5aaad3f4;hb=66bd9f829cd645cf0ddf151c1fbde82add1b4b3f;hp=fa7c3ec56ae5a6cb5fd334e3687d9b629e08fced;hpb=250ff166089b4bd2d3276e79fb985834a5b61cf9;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index fa7c3ec5..b59b6e08 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -1,9 +1,9 @@ package org.usfirst.frc.team3501.robot; +import org.usfirst.frc.team3501.robot.commands.shooter.RecordData; import org.usfirst.frc.team3501.robot.commands.shooter.Test1; import org.usfirst.frc.team3501.robot.commands.shooter.Test2; import org.usfirst.frc.team3501.robot.commands.shooter.Test3; -import org.usfirst.frc.team3501.robot.commands.shooter.Test4; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.buttons.Button; @@ -12,10 +12,10 @@ import edu.wpi.first.wpilibj.buttons.JoystickButton; public class OI { public static Joystick leftJoystick; public static Joystick rightJoystick; - public static Button test1; - public static Button test2; - public static Button test3; - public static Button test4; + public static Button recordData; + public static Button shoot; + public static Button incrementSpeed; + public static Button decrementSpeed; // // first column of arcade buttons - getting past defenses // public static DigitalButton passPortcullis; @@ -31,7 +31,8 @@ public class OI { // public static DigitalButton moveIntakeArmInsideRobot; // // // left joystick buttons - // public static Button toggleShooter; + public static Button toggleShooter; + // public static Button SpinRobot180_1; // both do the same thing, just two // public static Button SpinRobot180_2; // different buttons // public static Button compactRobot_1; @@ -48,22 +49,6 @@ public class OI { leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); - test1 = new JoystickButton(leftJoystick, - Constants.OI.SPIN1_PORT); - test1.whenPressed(new Test1()); - - test2 = new JoystickButton(leftJoystick, - Constants.OI.LEFT_JOYSTICK_TOP_CENTER_PORT); - test2.whenPressed(new Test2()); - - test3 = new JoystickButton(leftJoystick, - Constants.OI.SPIN2_PORT); - test3.whenPressed(new Test3()); - - test4 = new JoystickButton(leftJoystick, - Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT); - test4.whenPressed(new Test4()); - // passPortcullis = new DigitalButton( // new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT)); // passPortcullis.whenPressed(new PassPortcullis()); @@ -102,6 +87,23 @@ public class OI { // // toggleShooter = new JoystickButton(leftJoystick, // Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT); + + recordData = new JoystickButton(leftJoystick, + Constants.OI.SPIN1_PORT); + recordData.whenPressed(new RecordData()); + + shoot = new JoystickButton(leftJoystick, + Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT); + shoot.whenPressed(new Test1()); + + incrementSpeed = new JoystickButton(leftJoystick, + Constants.OI.SPIN2_PORT); + incrementSpeed.whenPressed(new Test2()); + + decrementSpeed = new JoystickButton(leftJoystick, + Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT); + decrementSpeed.whenPressed(new Test3()); + // SpinRobot180_1 = new JoystickButton(leftJoystick, // Constants.OI.SPIN1_PORT); // SpinRobot180_1.whenPressed(new Turn180());