]> git.taranathan.com Git - FRC2026.git/commitdiff
Run spindexer is now in autos (includes anti jam and alignment requirement)
authorWesley28w <wesleycwong@gmail.com>
Sun, 8 Mar 2026 14:28:48 +0000 (07:28 -0700)
committerWesley28w <wesleycwong@gmail.com>
Sun, 8 Mar 2026 14:28:48 +0000 (07:28 -0700)
This should be all there is to it. Just replace the old spindexer with this specific command

src/main/java/frc/robot/RobotContainer.java

index e7b1d9a28ea9ccf33928d42f0527ec7a270e2dc0..12880ee141f768d47210a372d3b6609383258c2a 100644 (file)
@@ -26,6 +26,7 @@ import frc.robot.commands.drive_comm.DefaultDriveCommand;
 import frc.robot.commands.gpm.AutoShootCommand;
 import frc.robot.commands.gpm.ClimbDriveCommand;
 import frc.robot.commands.gpm.IntakeMovementCommand;
+import frc.robot.commands.gpm.RunSpindexer;
 import frc.robot.commands.gpm.Superstructure;
 import frc.robot.commands.vision.ShutdownAllPis;
 import frc.robot.constants.AutoConstants;
@@ -209,14 +210,13 @@ public class RobotContainer {
       Command intakeMovement = new IntakeMovementCommand(intake);
       NamedCommands.registerCommand("Start Intake Seizure", new InstantCommand(()-> intakeMovement.schedule()));
       NamedCommands.registerCommand("Stop Intake Seizure", new InstantCommand(()-> intakeMovement.cancel()));
-
-
     }
 
     if (turret != null && drive != null && hood != null && shooter != null && spindexer != null){
+      Command runSpindexer = new RunSpindexer(spindexer, turret);
       NamedCommands.registerCommand("Auto shoot", new AutoShootCommand(turret, drive, hood, shooter, spindexer));
-      NamedCommands.registerCommand("Start Spindexer", new InstantCommand(()-> spindexer.maxSpindexer(), spindexer));
-      NamedCommands.registerCommand("Stop Spindexer", new InstantCommand(()-> spindexer.stopSpindexer()));
+      NamedCommands.registerCommand("Start Spindexer", new InstantCommand(() -> runSpindexer.schedule()));
+      NamedCommands.registerCommand("Stop Spindexer", new InstantCommand(() -> runSpindexer.cancel()));
     }
 
     if (hood != null){