Skip to content

Commit 7beceab

Browse files
committed
different buttons for auto and manual climb
1 parent 2ebbae5 commit 7beceab

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

  • Robot2019/src/main/java/frc/robot

Robot2019/src/main/java/frc/robot/OI.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public class OI {
4343
JoystickButton toggleHatchBtn;
4444
JoystickButton cargoIntakeBtn, cargoEjectBtn;
4545
JoystickButton climberRailBtn;
46-
JoystickButton climbBtn;
46+
JoystickButton autoClimbBtn;
47+
JoystickButton manualClimbBtn;
4748
JoystickButton toggleCameraBtn;
4849
JoystickButton wobbleDriveBtn;
4950
JoystickButton cycleLightBtn;
@@ -67,19 +68,22 @@ public class OI {
6768
normDriveBtn = new JoystickButton(leftJoy, 3);
6869
normDriveBtn.whileHeld(new NormalDrive());
6970

70-
toggleHatchBtn = new JoystickButton(manipulator, Manip.X); // TODO: set ports to correct values
71+
toggleHatchBtn = new JoystickButton(manipulator, Manip.X);
7172
toggleHatchBtn.whenPressed(new ToggleHatch(hp));
7273

73-
cargoIntakeBtn = new JoystickButton(manipulator, Manip.A); // TODO: set ports to correct values
74+
cargoIntakeBtn = new JoystickButton(manipulator, Manip.A);
7475
cargoIntakeBtn.whenPressed(new IntakeOnlyCargo(cargo, hp, dt));
75-
cargoEjectBtn = new JoystickButton(manipulator, Manip.B); // TODO: set ports to correct values
76+
cargoEjectBtn = new JoystickButton(manipulator, Manip.B);
7677
cargoEjectBtn.whenPressed(new EjectCargo(cargo));
7778

78-
climberRailBtn = new JoystickButton(manipulator, Manip.LB_lShoulder); // TODO: confirm button number
79+
climberRailBtn = new JoystickButton(manipulator, Manip.LB_lShoulder);
7980
climberRailBtn.whenPressed(new ActuateClimberRails(climber));
8081

81-
climbBtn = new JoystickButton(manipulator, Manip.Y); // TODO: confirm button number
82-
climbBtn.toggleWhenPressed(new ManualClimb(climber, dt, leftJoy, rightJoy));
82+
autoClimbBtn = new JoystickButton(manipulator, Manip.Y);
83+
autoClimbBtn.toggleWhenPressed(new Climb(climber, dt, leftJoy));
84+
85+
manualClimbBtn = new JoystickButton(manipulator, Manip.LT_lTrigger);
86+
manualClimbBtn.toggleWhenPressed(new ManualClimb(climber, dt, leftJoy, rightJoy));
8387

8488
toggleCameraBtn = new JoystickButton(leftJoy, 2);
8589
toggleCameraBtn.whenPressed(new ToggleCamera(driveCamera, hatchCamera, cameraServer));

0 commit comments

Comments
 (0)