Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit e584ed7

Browse files
committed
changed button names in OI
per Corvin's suggestion in order to clarify and leave no room for confusion about what is what (e.g. button was called PIDMove but so was the command it was calling; changed to PIDMoveButton, etc.) yeah, I know the names are long, but you know exactly what they are :)
1 parent 6526862 commit e584ed7

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

  • Robot2018/src/org/usfirst/frc/team199/Robot2018

Robot2018/src/org/usfirst/frc/team199/Robot2018/OI.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
public class OI {
2727

2828
public Joystick leftJoy;
29-
private JoystickButton shiftLowGear;
30-
private JoystickButton shiftHighGear;
31-
private JoystickButton shiftDriveType;
32-
private JoystickButton PIDMove;
33-
private JoystickButton PIDTurn;
29+
private JoystickButton shiftLowGearButton;
30+
private JoystickButton shiftHighGearButton;
31+
private JoystickButton shiftDriveTypeButton;
32+
private JoystickButton PIDMoveButton;
33+
private JoystickButton PIDTurnButton;
3434
public Joystick rightJoy;
35-
private JoystickButton updatePidConstants;
36-
private JoystickButton updateEncoderDPP;
35+
private JoystickButton updatePIDConstantsButton;
36+
private JoystickButton updateEncoderDPPButton;
3737
public Joystick manipulator;
3838

3939
public int getButton(String key, int def) {
@@ -45,22 +45,22 @@ public int getButton(String key, int def) {
4545

4646
public OI() {
4747
leftJoy = new Joystick(0);
48-
shiftLowGear = new JoystickButton(leftJoy, getButton("Shift Low Gear", 3));
49-
shiftLowGear.whenPressed(new ShiftLowGear());
50-
shiftHighGear = new JoystickButton(leftJoy, getButton("Shift High Gear", 5));
51-
shiftHighGear.whenPressed(new ShiftHighGear());
52-
shiftDriveType = new JoystickButton(leftJoy, getButton("Shift Drive Type", 2));
53-
shiftDriveType.whenPressed(new ShiftDriveType());
54-
PIDMove = new JoystickButton(leftJoy, getButton("PID Move", 7));
55-
PIDMove.whenPressed(new PIDMove(40, Robot.dt, RobotMap.distEncAvg));
56-
PIDTurn = new JoystickButton(leftJoy, getButton("PID Turn", 8));
57-
PIDTurn.whenPressed(new PIDTurn(30, Robot.dt, RobotMap.fancyGyro));
48+
shiftLowGearButton = new JoystickButton(leftJoy, getButton("Shift Low Gear", 3));
49+
shiftLowGearButton.whenPressed(new ShiftLowGear());
50+
shiftHighGearButton = new JoystickButton(leftJoy, getButton("Shift High Gear", 5));
51+
shiftHighGearButton.whenPressed(new ShiftHighGear());
52+
shiftDriveTypeButton = new JoystickButton(leftJoy, getButton("Shift Drive Type", 2));
53+
shiftDriveTypeButton.whenPressed(new ShiftDriveType());
54+
PIDMoveButton = new JoystickButton(leftJoy, getButton("PID Move", 7));
55+
PIDMoveButton.whenPressed(new PIDMove(40, Robot.dt, RobotMap.distEncAvg));
56+
PIDTurnButton = new JoystickButton(leftJoy, getButton("PID Turn", 8));
57+
PIDTurnButton.whenPressed(new PIDTurn(30, Robot.dt, RobotMap.fancyGyro));
5858

5959
rightJoy = new Joystick(1);
60-
updatePidConstants = new JoystickButton(rightJoy, getButton("Get PID Constants", 8));
61-
updatePidConstants.whenPressed(new UpdatePIDConstants());
62-
updateEncoderDPP = new JoystickButton(rightJoy, getButton("Get Encoder Dist Per Pulse", 9));
63-
updateEncoderDPP.whenPressed(new SetDistancePerPulse());
60+
updatePIDConstantsButton = new JoystickButton(rightJoy, getButton("Get PID Constants", 8));
61+
updatePIDConstantsButton.whenPressed(new UpdatePIDConstants());
62+
updateEncoderDPPButton = new JoystickButton(rightJoy, getButton("Get Encoder Dist Per Pulse", 9));
63+
updateEncoderDPPButton.whenPressed(new SetDistancePerPulse());
6464

6565
manipulator = new Joystick(2);
6666
}

0 commit comments

Comments
 (0)