import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.InstantCommand;
+import edu.wpi.first.wpilibj2.command.WaitCommand;
import frc.robot.commands.DoNothing;
import frc.robot.commands.gpm.IntakeMovementCommand;
+import frc.robot.commands.gpm.RunSpindexer;
import frc.robot.commands.gpm.RunSpindexerWithStop;
import frc.robot.subsystems.Intake.Intake;
import frc.robot.subsystems.hood.Hood;
}),
shuttlingTrajectory.cmd()));
+ routine.active().whileTrue(new RunSpindexer(spindexer, turret, hood, intake));
+
shuttlingTrajectory.done().onTrue(Commands.sequence(
new InstantCommand(() -> {
hood.forceHoodDown(false);
}),
- new RunSpindexerWithStop(spindexer, turret, hood, intake).raceWith(new IntakeMovementCommand(intake)),
+ new WaitCommand(2.0).raceWith(new IntakeMovementCommand(intake)),
new InstantCommand(() -> {
intake.extend();
intake.spinStart();
public AutoRoutine rightSuperShuttling(AutoFactory factory) {
AutoRoutine routine = factory.newRoutine("rightSuperShuttling");
-
- AutoTrajectory shuttlingTrajectory = routine.trajectory("superShuttling").mirrorY();
-
+
+ AutoTrajectory shuttlingTrajectory = routine.trajectory("superShuttling");
+
routine.active().onTrue(Commands.sequence(
shuttlingTrajectory.resetOdometry(),
new InstantCommand(() -> {
}),
shuttlingTrajectory.cmd()));
+ routine.active().whileTrue(new RunSpindexer(spindexer, turret, hood, intake));
+
shuttlingTrajectory.done().onTrue(Commands.sequence(
new InstantCommand(() -> {
hood.forceHoodDown(false);
}),
- new RunSpindexerWithStop(spindexer, turret, hood, intake).raceWith(new IntakeMovementCommand(intake)),
+ new WaitCommand(2.0).raceWith(new IntakeMovementCommand(intake)),
new InstantCommand(() -> {
intake.extend();
intake.spinStart();