1111import org .usfirst .frc .team199 .Robot2018 .commands .FindTurnTimeConstant ;
1212import org .usfirst .frc .team199 .Robot2018 .commands .IntakeCube ;
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 .ResetEncoders ;
@@ -43,24 +43,24 @@ public class OI {
4343 private JoystickButton shiftLowGearButton ;
4444 private JoystickButton shiftHighGearButton ;
4545 private JoystickButton shiftDriveTypeButton ;
46- private JoystickButton PIDMoveButton ;
47- private JoystickButton PIDTurnButton ;
46+ private JoystickButton pIDMoveButton ;
47+ private JoystickButton pIDTurnButton ;
4848 private JoystickButton resetEncButton ;
49- private JoystickButton MoveLiftUpButton ;
50- private JoystickButton MoveLiftDownButton ;
49+ private JoystickButton moveLiftUpButton ;
50+ private JoystickButton moveLiftDownButton ;
5151 private JoystickButton findTurnTimeConstantButton ;
5252 private JoystickButton updatePIDConstantsButton ;
5353 private JoystickButton updateEncoderDPPButton ;
5454
5555 public Joystick manipulator ;
56- private JoystickButton closeIntake ;
57- private JoystickButton openIntake ;
58- private JoystickButton raiseIntake ;
59- private JoystickButton lowerIntake ;
60- private JoystickButton intake ;
61- private JoystickButton outake ;
62- private JoystickButton toggleLeftIntake ;
63- private JoystickButton toggleRightIntake ;
56+ private JoystickButton closeIntakeButton ;
57+ private JoystickButton openIntakeButton ;
58+ private JoystickButton raiseIntakeButton ;
59+ private JoystickButton lowerIntakeButton ;
60+ private JoystickButton intakeCubeButton ;
61+ private JoystickButton outakeCubeButton ;
62+ private JoystickButton toggleLeftIntakeButton ;
63+ private JoystickButton toggleRightIntakeButton ;
6464
6565 public int getButton (String key , int def ) {
6666 if (!SmartDashboard .containsKey ("Button/" + key )) {
@@ -76,13 +76,13 @@ public OI(Robot robot) {
7676 leftJoy = new Joystick (0 );
7777 shiftDriveTypeButton = new JoystickButton (leftJoy , getButton ("Shift Drive Type" , 2 ));
7878 shiftDriveTypeButton .whenPressed (new ShiftDriveType ());
79- PIDMoveButton = new JoystickButton (leftJoy , getButton ("PID Move" , 7 ));
80- PIDMoveButton
79+ pIDMoveButton = new JoystickButton (leftJoy , getButton ("PID Move" , 7 ));
80+ pIDMoveButton
8181 .whenPressed (new PIDMove (Robot .sd .getConst ("Move Targ" , 24 ), Robot .dt , Robot .sd , RobotMap .distEncAvg ));
82- PIDTurnButton = new JoystickButton (leftJoy , getButton ("PID Turn" , 8 ));
82+ pIDTurnButton = new JoystickButton (leftJoy , getButton ("PID Turn" , 8 ));
8383 // PIDTurnButton.whenPressed(new PIDTurn(Robot.getConst("Turn Targ", 90),
8484 // Robot.dt, Robot.sd RobotMap.fancyGyro));
85- PIDTurnButton
85+ pIDTurnButton
8686 .whenReleased (new PIDTurn (Robot .getConst ("Turn Targ" , 90 ), Robot .dt , Robot .sd , RobotMap .fancyGyro ));
8787 resetEncButton = new JoystickButton (leftJoy , getButton ("Reset Dist Enc" , 10 ));
8888 resetEncButton .whenPressed (new ResetEncoders ());
@@ -100,33 +100,33 @@ public OI(Robot robot) {
100100 updatePIDConstantsButton .whenPressed (new UpdatePIDConstants ());
101101 updateEncoderDPPButton = new JoystickButton (rightJoy , getButton ("Get Encoder Dist Per Pulse" , 9 ));
102102 updateEncoderDPPButton .whenPressed (new SetDistancePerPulse ());
103- MoveLiftUpButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Up" , 10 ));
104- MoveLiftDownButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Down" , 11 ));
105- MoveLiftUpButton .whileHeld (new RunLift (Robot .lift , true ));
106- MoveLiftDownButton .whileHeld (new RunLift (Robot .lift , false ));
103+ moveLiftUpButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Up" , 10 ));
104+ moveLiftDownButton = new JoystickButton (rightJoy , getButton ("Run Lift Motor Down" , 11 ));
105+ moveLiftUpButton .whileHeld (new RunLift (Robot .lift , true ));
106+ moveLiftDownButton .whileHeld (new RunLift (Robot .lift , false ));
107107
108108 manipulator = new Joystick (2 );
109109 if (manipulator .getButtonCount () == 0 ) {
110110 System .out .println ("Manipulator not plugged in!" );
111111 } else {
112- closeIntake = new JoystickButton (manipulator , getButton ("Close Intake Button" , 1 ));
113- closeIntake .whenPressed (new CloseIntake ());
114- openIntake = new JoystickButton (manipulator , getButton ("Open Intake Button" , 2 ));
115- openIntake .whenPressed (new OpenIntake ());
112+ closeIntakeButton = new JoystickButton (manipulator , getButton ("Close Intake Button" , 1 ));
113+ closeIntakeButton .whenPressed (new CloseIntake ());
114+ openIntakeButton = new JoystickButton (manipulator , getButton ("Open Intake Button" , 2 ));
115+ openIntakeButton .whenPressed (new OpenIntake ());
116116 // raiseIntake = new JoystickButton(manipulator, getButton("Raise Intake
117117 // Button", 3));
118118 // raiseIntake.whenPressed(new RaiseIntake());
119119 // lowerIntake = new JoystickButton(manipulator, getButton("Lower Intake
120120 // Button", 4));
121121 // lowerIntake.whenPressed(new LowerIntake());
122- intake = new JoystickButton (manipulator , getButton ("Intake Button" , 5 ));
123- intake .whenPressed (new IntakeCube ());
124- outake = new JoystickButton (manipulator , getButton ("Outake Button" , 6 ));
125- outake .whenPressed (new OutakeCube ());
126- toggleLeftIntake = new JoystickButton (manipulator , getButton ("Toggle Left Intake Button" , 3 ));
127- toggleLeftIntake .whenPressed (new ToggleLeftIntake ());
128- toggleRightIntake = new JoystickButton (manipulator , getButton ("Toggle Right Intake Button" , 4 ));
129- toggleRightIntake .whenPressed (new ToggleRightIntake ());
122+ intakeCubeButton = new JoystickButton (manipulator , getButton ("Intake Button" , 5 ));
123+ intakeCubeButton .whenPressed (new IntakeCube ());
124+ outakeCubeButton = new JoystickButton (manipulator , getButton ("Outake Button" , 6 ));
125+ outakeCubeButton .whenPressed (new OuttakeCube ());
126+ toggleLeftIntakeButton = new JoystickButton (manipulator , getButton ("Toggle Left Intake Button" , 3 ));
127+ toggleLeftIntakeButton .whenPressed (new ToggleLeftIntake ());
128+ toggleRightIntakeButton = new JoystickButton (manipulator , getButton ("Toggle Right Intake Button" , 4 ));
129+ toggleRightIntakeButton .whenPressed (new ToggleRightIntake ());
130130 }
131131 }
132132
0 commit comments