Skip to content

Commit

Permalink
Merge branch 'vr-reset-180'
Browse files Browse the repository at this point in the history
  • Loading branch information
AccidentalMistake committed Feb 28, 2025
2 parents 807cddd + 7171ae8 commit 5092fc5
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/main/java/team/gif/robot/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import team.gif.robot.commands.climber.ClimberClimb;
import team.gif.robot.commands.climber.PistonToggleState;
import team.gif.robot.commands.driveModes.EnableRobotOrientedMode;
import team.gif.robot.commands.drivetrain.Reset180;
import team.gif.robot.commands.elevator.SetElevatorPosition;
import team.gif.robot.commands.shooter.Shoot;
import team.gif.robot.commands.driveModes.EnableBoost;
Expand Down Expand Up @@ -111,9 +112,10 @@ public OI() {
*/

// driver controls
dBack.and(dDPadDown).onTrue(new Reset0());
dBack.and(dDPadRight).onTrue(new InstantCommand(Robot.climber::zeroEncoder).ignoringDisable(true));
dBack.and(dDPadLeft).onTrue(new InstantCommand(Robot.elevator::zeroEncoder).ignoringDisable(true));
dStart.and(dDPadUp).onTrue(new Reset0());
dStart.and(dDPadDown).onTrue(new Reset180());
dStart.and(dDPadRight).onTrue(new InstantCommand(Robot.climber::zeroEncoder).ignoringDisable(true));
dStart.and(dDPadLeft).onTrue(new InstantCommand(Robot.elevator::zeroEncoder).ignoringDisable(true));
dA.whileTrue(new RepeatCommand(new InstantCommand(Robot.swerveDrive::modulesTo90)));
dRTrigger.whileTrue(new Shoot());
dLBump.whileTrue(new EnableBoost());
Expand All @@ -122,16 +124,17 @@ public OI() {
dRBump.whileTrue(new EnableRobotOrientedMode());

// aux controls
aBack.and(aDPadDown).onTrue(new Reset0());
aBack.and(aDPadRight).onTrue(new InstantCommand(Robot.climber::zeroEncoder).ignoringDisable(true));
aBack.and(aDPadLeft).onTrue(new InstantCommand(Robot.elevator::zeroEncoder).ignoringDisable(true));
aStart.and(aDPadUp).onTrue(new Reset0());
aStart.and(aDPadDown).onTrue(new Reset180());
aStart.and(aDPadRight).onTrue(new InstantCommand(Robot.climber::zeroEncoder).ignoringDisable(true));
aStart.and(aDPadLeft).onTrue(new InstantCommand(Robot.elevator::zeroEncoder).ignoringDisable(true));
aY.whileTrue(new ClimberClimb());
aA.whileTrue(new ClimberDeploy());
aStart.and(aBack).toggleOnTrue(new ToggleManualControl());
aRBump.onTrue(new PistonToggleState());
aDPadUp.and(aBack.negate()).onTrue(new SetElevatorPosition(Constants.Elevator.LEVEL_4_POSITION));
aDPadLeft.and(aBack.negate()).onTrue(new SetElevatorPosition(Constants.Elevator.LEVEL_3_POSITION));
aDPadDown.and(aBack.negate()).onTrue(new SetElevatorPosition(Constants.Elevator.LEVEL_2_POSITION));
aDPadUp.and(aStart.negate()).onTrue(new SetElevatorPosition(Constants.Elevator.LEVEL_4_POSITION));
aDPadLeft.and(aStart.negate()).onTrue(new SetElevatorPosition(Constants.Elevator.LEVEL_3_POSITION));
aDPadDown.and(aStart.negate()).onTrue(new SetElevatorPosition(Constants.Elevator.LEVEL_2_POSITION));
aLBump.onTrue(new SetElevatorPosition(Constants.Elevator.COLLECTOR_POSITION));

//test sys id for elevator, delete later
Expand Down

0 comments on commit 5092fc5

Please sign in to comment.