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

Intake position button #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ public static final class OIConstants {
public static final int kLevel1Button = kA;
public static final int kLevel2Button = kBack;
public static final int kLevel3Button = kStart;
public static final int kIntakePosition = kB;
public static final int kIntakeCoralButton = kX;
public static final int kIntakeALgaePOV = 0;
public static final int kEjectButton = kY;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ private void configureBindings() {
.onTrue(Commands.runOnce(() ->
m_crane.moveTo(CraneConstants.kPositionL3), m_crane));

// Manual crane to intake
new Trigger(() ->
m_operatorController.getRawButton(OIConstants.kManualOperatorMode) &&
m_operatorController.getRawButton(OIConstants.kIntakePosition))
.debounce(OIConstants.kDebounceSeconds)
.onTrue(Commands.runOnce(() ->
m_crane.moveTo(CraneConstants.kPositionIntake), m_crane));

// Manual intake coral
new Trigger(() ->
m_operatorController.getRawButton(OIConstants.kManualOperatorMode) &&
Expand Down