comment out necessary stuff in OI
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / OI.java
CommitLineData
38a404b3
KZ
1package org.usfirst.frc.team3501.robot;
2
3import edu.wpi.first.wpilibj.Joystick;
cb3389eb 4import edu.wpi.first.wpilibj.buttons.Button;
38a404b3
KZ
5
6public class OI {
7 public static Joystick leftJoystick;
8 public static Joystick rightJoystick;
6b06b2bc
CZ
9
10 // first column of arcade buttons - getting past defenses
11 public static DigitalButton passPortcullis;
12 public static DigitalButton passChevalDeFrise;
13 public static DigitalButton passDrawbridge;
14 public static DigitalButton passSallyPort;
15
16 // second column of arcade buttons - different angles for intake arm
17 // TO DO: change position numbers to angle values (?)
18 public static DigitalButton lowerChevalDeFrise;
19 public static DigitalButton moveToIntakeBoulder;
20 public static DigitalButton poiseAboveChevalDeFrise;
21 public static DigitalButton moveIntakeArmInsideRobot;
22
23 // left joystick buttons
24 public static Button toggleShooter;
25 public static Button SpinRobot180_1; // both do the same thing, just two
26 public static Button SpinRobot180_2; // different buttons
27 public static Button compactRobot_1;
28 public static Button compactRobot_2;
29
30 // right joystick buttons
31 public static Button intakeBoulder;
32 public static Button shootBoulder;
33
34 // button to change robot to the scaling mode
52ef246c 35 public static DigitalButton toggleScaling;
38a404b3
KZ
36
37 public OI() {
38 leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
39 rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
40
a28e24c7
CZ
41 // passPortcullis = new DigitalButton(
42 // new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT));
43 // passPortcullis.whenPressed(new PassPortcullis());
44 //
45 // passChevalDeFrise = new DigitalButton(
46 // new DigitalInput(Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
47 // passChevalDeFrise.whenPressed(new PassChevalDeFrise());
48 //
49 // passDrawbridge = new DigitalButton(
50 // new DigitalInput(Constants.OI.PASS_DRAWBRIDGE_PORT));
51 // passDrawbridge.whenPressed(new PassDrawBridge());
52 //
53 // passSallyPort = new DigitalButton(
54 // new DigitalInput(Constants.OI.PASS_SALLYPORT_PORT));
55 // passSallyPort.whenPressed(new PassSallyPort());
56 //
57 // lowerChevalDeFrise = new DigitalButton(
58 // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
59 // lowerChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
60 // IntakeArm.potAngles[0], IntakeArm.moveIntakeArmSpeed));
61 //
62 // moveToIntakeBoulder = new DigitalButton(
63 // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
64 // moveToIntakeBoulder.whenPressed(new MoveIntakeArmToAngle(
65 // IntakeArm.potAngles[1], IntakeArm.moveIntakeArmSpeed));
66 //
67 // poiseAboveChevalDeFrise = new DigitalButton(
68 // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
69 // poiseAboveChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
70 // IntakeArm.potAngles[2], IntakeArm.moveIntakeArmSpeed));
71 //
72 // moveIntakeArmInsideRobot = new DigitalButton(
73 // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
74 // moveIntakeArmInsideRobot.whenPressed(new MoveIntakeArmToAngle(
75 // IntakeArm.potAngles[3], IntakeArm.moveIntakeArmSpeed));
76 //
77 // toggleShooter = new JoystickButton(leftJoystick,
78 // Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
79 // SpinRobot180_1 = new JoystickButton(leftJoystick,
80 // Constants.OI.SPIN1_PORT);
81 // SpinRobot180_1.whenPressed(new Turn180());
82 //
83 // SpinRobot180_2 = new JoystickButton(leftJoystick,
84 // Constants.OI.SPIN2_PORT);
85 // SpinRobot180_2.whenPressed(new Turn180());
86 //
87 // compactRobot_1 = new JoystickButton(leftJoystick,
88 // Constants.OI.LEFT_JOYSTICK_TOP_CENTER_PORT);
89 // compactRobot_2 = new JoystickButton(leftJoystick,
90 // Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT);
91 //
92 // intakeBoulder = new JoystickButton(rightJoystick,
93 // Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
94 // shootBoulder = new JoystickButton(rightJoystick,
95 // Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
96 //
97 // toggleScaling = new DigitalButton(
98 // new DigitalInput(Constants.OI.TOGGLE_SCALING_PORT));
99 // toggleScaling.whenPressed(new ToggleScaling());
100 //
101 // if (!Constants.Scaler.SCALING) {
102 // toggleShooter.toggleWhenPressed(new runShooter());
103 // compactRobot_1.whenPressed(new CompactRobot());
104 // compactRobot_2.whenPressed(new CompactRobot());
105 //
106 // intakeBoulder.whenPressed(new IntakeBall());
107 // shootBoulder.whenPressed(new Shoot());
108 //
109 // } else {
110 // // toggleShooter becomes winch
111 // // compact robot button 1 and 2 retracts the lift
112 // // intake button stops the winch
113 // // shoot button extends the lift
114 // toggleShooter.whenPressed(new RunWinchContinuous(
115 // Constants.Scaler.SCALE_SPEED, Constants.Scaler.SECONDS_TO_SCALE));
116 // compactRobot_1.whenPressed(new RetractLift());
117 // compactRobot_2.whenPressed(new RetractLift());
118 //
119 // intakeBoulder.whenReleased(new StopWinch());
120 // shootBoulder.whenPressed(new ExtendLift());
121 // }
38a404b3
KZ
122 }
123}