Skip to content

Commit

Permalink
Add extra press for climb sequence, add initializeation override to o…
Browse files Browse the repository at this point in the history
…perator controller
  • Loading branch information
superpenguin612 committed Mar 22, 2024
1 parent 8c6c98c commit 0077b40
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/main/java/frc/robot/Controls.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.techhounds.houndutil.houndlib.oi.CommandVirpilJoystick;

import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.button.CommandGenericHID;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;
Expand Down Expand Up @@ -69,8 +70,11 @@ public static void configureDriverControls(int port, Drivetrain drivetrain, Inta
() -> -joystick.getTwist(), drivetrain,
intake, shooter,
shooterTilt, climber, noteLift));
joystick.flipTriggerIn().and(joystick.triggerSoftPress().or(joystick.triggerHardPress()))
.whileTrue(climber.climbToBottomCommand().andThen(noteLift.scoreNoteCommand()));
joystick.flipTriggerIn().and(joystick.triggerSoftPress()).whileTrue(
Commands.sequence(
climber.climbToBottomCommand(),
Commands.waitUntil(joystick.triggerHardPress()),
noteLift.scoreNoteCommand()));
}

public static void configureOperatorControls(int port, Drivetrain drivetrain, Intake intake, Shooter shooter,
Expand All @@ -89,12 +93,18 @@ public static void configureOperatorControls(int port, Drivetrain drivetrain, In
controller.povDown().whileTrue(RobotCommands.resetClimb(intake, shooter,
shooterTilt, climber, noteLift));
controller.povUp().whileTrue(RobotCommands.deClimb(intake, shooter,
shooterTilt, climber, noteLift));
shooterTilt, climber, noteLift).finallyDo(climber.resetControllersCommand()::schedule));
controller.povRight()
.whileTrue(RobotCommands.moveToHomeCommand(intake, shooter, shooterTilt,
climber, noteLift));
controller.povLeft()
.whileTrue(RobotCommands.homeMechanismsCommand(intake, shooter, shooterTilt, climber, noteLift));
controller.povLeft().onTrue(
Commands.sequence(
drivetrain.setInitializedCommand(true),
intake.setInitializedCommand(true),
shooterTilt.setInitializedCommand(true),
climber.setInitializedCommand(true),
noteLift.setInitializedCommand(true),
GlobalStates.INITIALIZED.enableCommand()).ignoringDisable(true));
}

public static void configureOverridesControls(int port, Drivetrain drivetrain, Intake intake, Shooter shooter,
Expand Down

0 comments on commit 0077b40

Please sign in to comment.