77
88package org .usfirst .frc .team199 .Robot2018 ;
99
10+ import org .usfirst .frc .team199 .Robot2018 .commands .CloseIntake ;
11+ import org .usfirst .frc .team199 .Robot2018 .commands .IntakeCube ;
12+ import org .usfirst .frc .team199 .Robot2018 .commands .LowerIntake ;
13+ import org .usfirst .frc .team199 .Robot2018 .commands .OpenIntake ;
14+ import org .usfirst .frc .team199 .Robot2018 .commands .OuttakeCube ;
1015import org .usfirst .frc .team199 .Robot2018 .commands .PIDMove ;
1116import org .usfirst .frc .team199 .Robot2018 .commands .PIDTurn ;
1217import org .usfirst .frc .team199 .Robot2018 .commands .ResetEncoders ;
@@ -35,21 +40,21 @@ public class OI {
3540 private JoystickButton shiftLowGearButton ;
3641 private JoystickButton shiftHighGearButton ;
3742 private JoystickButton shiftDriveTypeButton ;
38- private JoystickButton PIDMoveButton ;
39- private JoystickButton PIDTurnButton ;
43+ private JoystickButton pIDMoveButton ;
44+ private JoystickButton pIDTurnButton ;
4045 private JoystickButton resetEncButton ;
41- private JoystickButton MoveLiftUpButton ;
42- private JoystickButton MoveLiftDownButton ;
46+ private JoystickButton moveLiftUpButton ;
47+ private JoystickButton moveLiftDownButton ;
4348 public Joystick rightJoy ;
4449 private JoystickButton updatePIDConstantsButton ;
4550 private JoystickButton updateEncoderDPPButton ;
4651 public static Joystick manipulator ;
47- private JoystickButton closeIntake ;
48- private JoystickButton openIntake ;
49- private JoystickButton raiseIntake ;
50- private JoystickButton lowerIntake ;
51- private JoystickButton intake ;
52- private JoystickButton outake ;
52+ private JoystickButton closeIntakeButton ;
53+ private JoystickButton openIntakeButton ;
54+ private JoystickButton raiseIntakeButton ;
55+ private JoystickButton lowerIntakeButton ;
56+ private JoystickButton intakeCubeButton ;
57+ private JoystickButton outtakeCubeButton ;
5358
5459 public int getButton (String key , int def ) {
5560 if (!SmartDashboard .containsKey ("Button/" + key )) {
@@ -65,13 +70,13 @@ public OI() {
6570 leftJoy = new Joystick (0 );
6671 shiftDriveTypeButton = new JoystickButton (leftJoy , getButton ("Shift Drive Type" , 2 ));
6772 shiftDriveTypeButton .whenPressed (new ShiftDriveType ());
68- PIDMoveButton = new JoystickButton (leftJoy , getButton ("PID Move" , 7 ));
69- PIDMoveButton
73+ pIDMoveButton = new JoystickButton (leftJoy , getButton ("PID Move" , 7 ));
74+ pIDMoveButton
7075 .whenPressed (new PIDMove (Robot .sd .getConst ("Move Targ" , 24 ), Robot .dt , Robot .sd , RobotMap .distEncAvg ));
71- PIDTurnButton = new JoystickButton (leftJoy , getButton ("PID Turn" , 8 ));
76+ pIDTurnButton = new JoystickButton (leftJoy , getButton ("PID Turn" , 8 ));
7277 // PIDTurnButton.whenPressed(new PIDTurn(Robot.getConst("Turn Targ", 90),
7378 // Robot.dt, Robot.sd RobotMap.fancyGyro));
74- PIDTurnButton
79+ pIDTurnButton
7580 .whenReleased (new PIDTurn (Robot .getConst ("Turn Targ" , 90 ), Robot .dt , Robot .sd , RobotMap .fancyGyro ));
7681 resetEncButton = new JoystickButton (leftJoy , getButton ("Reset Dist Enc" , 10 ));
7782 resetEncButton .whenPressed (new ResetEncoders ());
@@ -87,22 +92,18 @@ public OI() {
8792 updateEncoderDPPButton .whenPressed (new SetDistancePerPulse ());
8893
8994 // manipulator = new Joystick(2);
90- // closeIntake = new JoystickButton(manipulator, getButton("Close Intake
91- // Button", 1));
92- // closeIntake.whenPressed(new CloseIntake());
93- // openIntake = new JoystickButton(manipulator, getButton("Open Intake Button",
94- // 2));
95- // openIntake.whenPressed(new OpenIntake());
96- // raiseIntake = new JoystickButton(manipulator, getButton("Raise Intake
97- // Button", 3));
98- // raiseIntake.whenPressed(new RaiseIntake());
99- // lowerIntake = new JoystickButton(manipulator, getButton("Lower Intake
100- // Button", 4));
101- // lowerIntake.whenPressed(new LowerIntake());
102- // intake = new JoystickButton(manipulator, getButton("Intake Button", 5));
103- // intake.whenPressed(new IntakeCube());
104- // outake = new JoystickButton(manipulator, getButton("Outake Button", 6));
105- // outake.whenPressed(new OutakeCube());
95+ // closeIntakeButton = new JoystickButton(manipulator, getButton("Close Intake Button", 1));
96+ // closeIntakeButton.whenPressed(new CloseIntake());
97+ // openIntakeButton = new JoystickButton(manipulator, getButton("Open Intake Button", 2));
98+ // openIntakeButton.whenPressed(new OpenIntake());
99+ // raiseIntakeButton = new JoystickButton(manipulator, getButton("Raise Intake Button", 3));
100+ // raiseIntakeButton.whenPressed(new RaiseIntake());
101+ // lowerIntakeButton = new JoystickButton(manipulator, getButton("Lower Intake Button", 4));
102+ // lowerIntakeButton.whenPressed(new LowerIntake());
103+ // intakeCubeButton = new JoystickButton(manipulator, getButton("Intake Button", 5));
104+ // intakeCubeButton.whenPressed(new IntakeCube());
105+ // outtakeCubeButton = new JoystickButton(manipulator, getButton("Outtake Button", 6));
106+ // outtakeCubeButton.whenPressed(new OuttakeCube());
106107
107108 /*MoveLiftUpButton = new JoystickButton(manipulator, getButton("Run Lift Motor Up", 7));
108109 MoveLiftDownButton = new JoystickButton(manipulator, getButton("Run Lift Motor Down", 8));
0 commit comments