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

Update OperatorCommandMap with ScoochNoteCommand #71

Merged
merged 1 commit into from
Feb 3, 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import javax.inject.Provider;
import javax.inject.Singleton;

import competition.subsystems.arm.ArmSubsystem;
import competition.subsystems.arm.commands.SetArmAngleCommand;
import competition.subsystems.collector.commands.EjectCollectorCommand;
import competition.subsystems.collector.commands.FireCollectorCommand;
import competition.subsystems.collector.commands.IntakeCollectorCommand;
Expand Down Expand Up @@ -45,7 +47,8 @@ public void setupFundamentalCommands(
IntakeCollectorCommand collectorIntake,
EjectCollectorCommand collectorEject,
WarmUpShooterCommand shooterWarmUp,
FireCollectorCommand fireCollectorCommand
FireCollectorCommand fireCollectorCommand,
SetArmAngleCommand armAngle
) {
// Scooch
oi.operatorGamepad.getXboxButton(XboxButton.RightBumper).whileTrue(scoocherIntake);
Expand All @@ -59,7 +62,11 @@ public void setupFundamentalCommands(
shooterWarmUp.setTargetRpm(ShooterWheelSubsystem.TargetRPM.NEARSHOT);
oi.operatorGamepad.getXboxButton(XboxButton.X).whileTrue(shooterWarmUp);
oi.operatorGamepad.getXboxButton(XboxButton.A).whileTrue(fireCollectorCommand);

// Arms are taken care of via their maintainer & human overrides.
armAngle.setArmPosition(ArmSubsystem.UsefulArmPosition.SCOOCH_NOTE);
var scoochNote = scoocherIntake.alongWith(armAngle);
// TODO: bind scoochNote action to a button in operatorGamepad
}

// Example for setting up a command to fire when a button is pressed:
Expand Down
Loading