2626public 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