Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added outake button to driver #149

Merged
merged 2 commits into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,16 @@ private void configureDriverButtonBindings() {
new JoystickButton(m_driver,OIConstants.kZorroAIn)
.whileTrue((new ZorroDriveCommand(m_swerve, DriveConstants.kDriveKinematicsDriveFromArm, m_driver)));

new JoystickButton(m_driver, OIConstants.kZorroDIn)
.whileTrue(m_intake.createOuttakeToAmpCommand()
.onlyIf(m_arm.stateChecker(ArmState.DEPLOYED)));

Trigger armDeployed = new Trigger(m_arm.stateChecker(ArmState.DEPLOYED));
JoystickButton D_Button = new JoystickButton(m_driver, OIConstants.kZorroDIn);

// Reverse intake to outake or reject intaking Note
D_Button.and(armDeployed.negate())
.whileTrue(m_intake.createOuttakeToFloorCommand());
// Shoot Note into Amp
D_Button.and(armDeployed)
.whileTrue(m_intake.createOuttakeToAmpCommand());
}
// spotless:on

Expand Down