-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d88dc2
commit 90b4d66
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/frc/robot/commands/auton/AutoAmpSequence.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package frc.robot.commands.auton; | ||
|
||
import edu.wpi.first.wpilibj2.command.Commands; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import frc.robot.commands.intake.roller.IntakeRollerOuttakeCommand; | ||
import frc.robot.commands.sequences.PrepareAmpSequence; | ||
import frc.robot.commands.swerve.AlignCommand; | ||
import frc.robot.subsystems.FieldManagementSubsystem; | ||
import frc.robot.subsystems.elevator.ElevatorSubsystem; | ||
import frc.robot.subsystems.intake.IntakePivotSubsystem; | ||
import frc.robot.subsystems.intake.IntakeRollerSubsystem; | ||
import frc.robot.subsystems.swerve.SwerveSubsystem; | ||
|
||
/** Automatically runs an amp cycle including preparing the note, going to and aligning with the amp, and depositing the | ||
* note (given that the robot already has a note). */ | ||
public class AutoAmpSequence extends SequentialCommandGroup { | ||
|
||
/** Constructs a new {@link AutoAmpSequence}. */ | ||
public AutoAmpSequence(FieldManagementSubsystem fms, | ||
SwerveSubsystem swerveSubsystem, | ||
ElevatorSubsystem elevatorSubsystem, | ||
IntakePivotSubsystem intakePivotSubsystem, | ||
IntakeRollerSubsystem intakeRollerSubsystem) { | ||
|
||
addCommands( | ||
Commands.parallel( | ||
new PrepareAmpSequence(elevatorSubsystem, intakePivotSubsystem, intakeRollerSubsystem), | ||
AlignCommand.getAmpAlignCommand(swerveSubsystem, fms.isRedAlliance()) | ||
), | ||
new IntakeRollerOuttakeCommand(intakeRollerSubsystem).withTimeout(1) | ||
); | ||
} | ||
} |