Skip to content

Commit

Permalink
added button to reenable arm
Browse files Browse the repository at this point in the history
  • Loading branch information
p-ifka committed Mar 21, 2024
1 parent 91c38c1 commit 0867737
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/frc/robot/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ private static class DRIVER_MAP {
private static final int SHIFT_UP_BUTTON = 3;
private static final int SHIFT_DOWN_BUTTON = 2;
private static final int LOW_SHIFT_BUTTON = 1;
private static final int ARM_TOGGLE_BUTTON = 4; //toggles value of armBroken incase there's a false positive
}

private static final XboxController xboxController = new XboxController(PORT.OPERATOR_CONTROLLER);
Expand Down Expand Up @@ -52,6 +53,8 @@ private static class OPERATOR_MAP {
public static final JoystickButton shiftUpButton = new JoystickButton(rightJoystick, DRIVER_MAP.SHIFT_UP_BUTTON);
public static final JoystickButton shiftDownButton = new JoystickButton(rightJoystick, DRIVER_MAP.SHIFT_DOWN_BUTTON);
public static final JoystickButton lowShiftButton = new JoystickButton(leftJoystick, DRIVER_MAP.LOW_SHIFT_BUTTON);

public static final JoystickButton armToggleButton = new JoystickButton(leftJoystick, DRIVER_MAP.ARM_TOGGLE_BUTTON);

/** Operator (Xbox Controller) */
public static final Trigger spinOutClawButton = new Trigger(() -> xboxController.getRawAxis(OPERATOR_MAP.SPIN_OUT_INTAKE_TRIGGER) >= XBOX_TRIGGER_THRESHOLD);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ private void configureBindings() {
//OI.shiftDownButton.onTrue(new ShiftDownCommand(drivetrain));

// Not requiring drivetrain because we dont want to interupt DriveCommand

//OI.armToggleButton.onTrue();
OI.lowShiftButton.whileTrue(Commands.runOnce(() -> {
drivetrain.disableAutoShifting();
drivetrain.setGear(Gear.LOW);
Expand Down

0 comments on commit 0867737

Please sign in to comment.