1111import org .usfirst .frc .team199 .Robot2018 .commands .IntakeCube ;
1212import org .usfirst .frc .team199 .Robot2018 .commands .LowerIntake ;
1313import org .usfirst .frc .team199 .Robot2018 .commands .OpenIntake ;
14- import org .usfirst .frc .team199 .Robot2018 .commands .OutakeCube ;
14+ import org .usfirst .frc .team199 .Robot2018 .commands .OuttakeCube ;
1515import org .usfirst .frc .team199 .Robot2018 .commands .PIDMove ;
1616import org .usfirst .frc .team199 .Robot2018 .commands .PIDTurn ;
1717import org .usfirst .frc .team199 .Robot2018 .commands .RaiseIntake ;
@@ -41,21 +41,21 @@ public class OI {
4141 private JoystickButton shiftLowGearButton ;
4242 private JoystickButton shiftHighGearButton ;
4343 private JoystickButton shiftDriveTypeButton ;
44- private JoystickButton PIDMoveButton ;
45- private JoystickButton PIDTurnButton ;
44+ private JoystickButton pIDMoveButton ;
45+ private JoystickButton pIDTurnButton ;
4646 private JoystickButton resetEncButton ;
47- private JoystickButton MoveLiftUpButton ;
48- private JoystickButton MoveLiftDownButton ;
47+ private JoystickButton moveLiftUpButton ;
48+ private JoystickButton moveLiftDownButton ;
4949 public Joystick rightJoy ;
5050 private JoystickButton updatePIDConstantsButton ;
5151 private JoystickButton updateEncoderDPPButton ;
5252 public Joystick manipulator ;
53- private JoystickButton closeIntake ;
54- private JoystickButton openIntake ;
55- private JoystickButton raiseIntake ;
56- private JoystickButton lowerIntake ;
57- private JoystickButton intake ;
58- private JoystickButton outake ;
53+ private JoystickButton closeIntakeButton ;
54+ private JoystickButton openIntakeButton ;
55+ private JoystickButton raiseIntakeButton ;
56+ private JoystickButton lowerIntakeButton ;
57+ private JoystickButton intakeCubeButton ;
58+ private JoystickButton outtakeCubeButton ;
5959
6060 public int getButton (String key , int def ) {
6161 if (!SmartDashboard .containsKey ("Button/" + key )) {
@@ -71,13 +71,13 @@ public OI() {
7171 leftJoy = new Joystick (0 );
7272 shiftDriveTypeButton = new JoystickButton (leftJoy , getButton ("Shift Drive Type" , 2 ));
7373 shiftDriveTypeButton .whenPressed (new ShiftDriveType ());
74- PIDMoveButton = new JoystickButton (leftJoy , getButton ("PID Move" , 7 ));
75- PIDMoveButton
74+ pIDMoveButton = new JoystickButton (leftJoy , getButton ("PID Move" , 7 ));
75+ pIDMoveButton
7676 .whenPressed (new PIDMove (Robot .sd .getConst ("Move Targ" , 24 ), Robot .dt , Robot .sd , RobotMap .distEncAvg ));
77- PIDTurnButton = new JoystickButton (leftJoy , getButton ("PID Turn" , 8 ));
77+ pIDTurnButton = new JoystickButton (leftJoy , getButton ("PID Turn" , 8 ));
7878 // PIDTurnButton.whenPressed(new PIDTurn(Robot.getConst("Turn Targ", 90),
7979 // Robot.dt, Robot.sd RobotMap.fancyGyro));
80- PIDTurnButton
80+ pIDTurnButton
8181 .whenReleased (new PIDTurn (Robot .getConst ("Turn Targ" , 90 ), Robot .dt , Robot .sd , RobotMap .fancyGyro ));
8282 resetEncButton = new JoystickButton (leftJoy , getButton ("Reset Dist Enc" , 10 ));
8383 resetEncButton .whenPressed (new ResetEncoders ());
@@ -91,23 +91,23 @@ public OI() {
9191 updatePIDConstantsButton .whenPressed (new UpdatePIDConstants ());
9292 updateEncoderDPPButton = new JoystickButton (rightJoy , getButton ("Get Encoder Dist Per Pulse" , 9 ));
9393 updateEncoderDPPButton .whenPressed (new SetDistancePerPulse ());
94- MoveLiftUpButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Up" , 10 ));
95- MoveLiftDownButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Down" , 11 ));
96- MoveLiftUpButton .whileHeld (new RunLift (Robot .lift , true ));
97- MoveLiftDownButton .whileHeld (new RunLift (Robot .lift , false ));
94+ moveLiftUpButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Up" , 10 ));
95+ moveLiftDownButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Down" , 11 ));
96+ moveLiftUpButton .whileHeld (new RunLift (Robot .lift , true ));
97+ moveLiftDownButton .whileHeld (new RunLift (Robot .lift , false ));
9898
9999 manipulator = new Joystick (2 );
100- closeIntake = new JoystickButton (manipulator , getButton ("Close Intake Button" , 1 ));
101- closeIntake .whenPressed (new CloseIntake ());
102- openIntake = new JoystickButton (manipulator , getButton ("Open Intake Button" , 2 ));
103- openIntake .whenPressed (new OpenIntake ());
104- raiseIntake = new JoystickButton (manipulator , getButton ("Raise Intake Button" , 3 ));
105- raiseIntake .whenPressed (new RaiseIntake ());
106- lowerIntake = new JoystickButton (manipulator , getButton ("Lower Intake Button" , 4 ));
107- lowerIntake .whenPressed (new LowerIntake ());
108- intake = new JoystickButton (manipulator , getButton ("Intake Button" , 5 ));
109- intake .whenPressed (new IntakeCube ());
110- outake = new JoystickButton (manipulator , getButton ("Outake Button" , 6 ));
111- outake .whenPressed (new OutakeCube ());
100+ closeIntakeButton = new JoystickButton (manipulator , getButton ("Close Intake Button" , 1 ));
101+ closeIntakeButton .whenPressed (new CloseIntake ());
102+ openIntakeButton = new JoystickButton (manipulator , getButton ("Open Intake Button" , 2 ));
103+ openIntakeButton .whenPressed (new OpenIntake ());
104+ raiseIntakeButton = new JoystickButton (manipulator , getButton ("Raise Intake Button" , 3 ));
105+ raiseIntakeButton .whenPressed (new RaiseIntake ());
106+ lowerIntakeButton = new JoystickButton (manipulator , getButton ("Lower Intake Button" , 4 ));
107+ lowerIntakeButton .whenPressed (new LowerIntake ());
108+ intakeCubeButton = new JoystickButton (manipulator , getButton ("Intake Button" , 5 ));
109+ intakeCubeButton .whenPressed (new IntakeCube ());
110+ outtakeCubeButton = new JoystickButton (manipulator , getButton ("Outake Button" , 6 ));
111+ outtakeCubeButton .whenPressed (new OuttakeCube ());
112112 }
113113}
0 commit comments