diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 4f8db324..3e30d48a 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -27,6 +27,7 @@ import frc.robot.commands.mailbox.DeployMailbox; import frc.robot.commands.mailbox.DeployPneumatics; import frc.robot.commands.mailbox.FireNoteRoutine; +import frc.robot.commands.mailbox.FireNoteRoutineNoLimitSwitch; import frc.robot.commands.mailbox.RunBelts; import frc.robot.subsystems.Drive; import frc.robot.subsystems.Intake; @@ -85,6 +86,8 @@ public class RobotContainer { private DeployMailbox deployMailbox = new DeployMailbox(); private DeindexNote deindexNote = new DeindexNote(); private FireNoteRoutine fireNote = new FireNoteRoutine(); + private FireNoteRoutineNoLimitSwitch fireNoteRoutineNoLimitSwitch = + new FireNoteRoutineNoLimitSwitch(); private RunIntake runIntake = new RunIntake(); private AimWithLimelight aimToAmp = new AimWithLimelight( @@ -134,8 +137,10 @@ private void configureBindings() { driverController.leftStick().toggleOnTrue(driveFieldOriented); driverController.x().onTrue(enterXMode); - driverController.a().onTrue(runIntake); driverController.y().onTrue(fireNote); + driverController.a().onTrue(runIntake); + driverController.rightTrigger().onTrue(deployMailbox); + driverController.b().onTrue(fireNoteRoutineNoLimitSwitch); } /** diff --git a/src/main/java/frc/robot/commands/mailbox/FireNoteRoutineNoLimitSwitch.java b/src/main/java/frc/robot/commands/mailbox/FireNoteRoutineNoLimitSwitch.java new file mode 100644 index 00000000..6850a9ea --- /dev/null +++ b/src/main/java/frc/robot/commands/mailbox/FireNoteRoutineNoLimitSwitch.java @@ -0,0 +1,26 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +/* + * Asimov's Laws: + * The First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm. + * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. + * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. + */ + +package frc.robot.commands.mailbox; + +import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; +import frc.robot.commands.RunIntake; + +/** + * Scores the note into the amp. Raises the mailbox, runs the mailbox belts, and then runs the index + * belts to send the note into the belts without a limit switch. + */ +public class FireNoteRoutineNoLimitSwitch extends ParallelCommandGroup { + /** Creates a new FireNoteRoutineNoLimitSwitch. */ + public FireNoteRoutineNoLimitSwitch() { + addCommands(new DeployMailbox(), new RunIntake()); + } +}