From 99587503b25e5b25583a6cf23e00d8751d42e597 Mon Sep 17 00:00:00 2001 From: iefomit Date: Sat, 7 Mar 2026 13:53:45 -0800 Subject: [PATCH] fix intake auto commands + path markers --- .../#2 Left(No SOTM) under the trench.path | 6 ++++++ src/main/java/frc/robot/RobotContainer.java | 19 ++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/deploy/pathplanner/paths/#2 Left(No SOTM) under the trench.path b/src/main/deploy/pathplanner/paths/#2 Left(No SOTM) under the trench.path index a4dd615..1936de6 100644 --- a/src/main/deploy/pathplanner/paths/#2 Left(No SOTM) under the trench.path +++ b/src/main/deploy/pathplanner/paths/#2 Left(No SOTM) under the trench.path @@ -90,6 +90,12 @@ "data": { "name": "Stop Intake Rollers" } + }, + { + "type": "named", + "data": { + "name": "Retract Intake" + } } ] } diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index f02e54b..97f3fe3 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -19,6 +19,7 @@ import edu.wpi.first.wpilibj.livewindow.LiveWindow; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; +import edu.wpi.first.wpilibj2.command.CommandScheduler; import edu.wpi.first.wpilibj2.command.InstantCommand; import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import frc.robot.commands.DoNothing; @@ -198,19 +199,11 @@ public class RobotContainer { if (intake != null){ NamedCommands.registerCommand("Extend Intake", new InstantCommand(()-> intake.extend())); NamedCommands.registerCommand("Retract Intake", new InstantCommand(()-> intake.retract())); - } - - if (intake != null && spindexer != null){ - NamedCommands.registerCommand("Spin Intake Rollers", new ParallelCommandGroup( - new InstantCommand(()->intake.spin(IntakeConstants.SPEED)) - )); - NamedCommands.registerCommand("Stop Intake Rollers", new ParallelCommandGroup( - new InstantCommand(()->intake.spinStop()) - )); - Command intakeMovement = new IntakeMovementCommand(intake); - NamedCommands.registerCommand("Start Intake Seizure", new InstantCommand(()-> intakeMovement.schedule())); - NamedCommands.registerCommand("Stop Intake Seizure", new InstantCommand(()-> intakeMovement.cancel())); - + NamedCommands.registerCommand("Intermediate Extend", new InstantCommand(()-> intake.intermediateExtend())); + NamedCommands.registerCommand("Spin Intake Rollers", new InstantCommand(()-> intake.spinStart())); + NamedCommands.registerCommand("Stop Intake Rollers", new InstantCommand(()-> intake.spinStop())); + NamedCommands.registerCommand("Start Intake Seizure", new InstantCommand(()-> new IntakeMovementCommand(intake).schedule())); + NamedCommands.registerCommand("Stop Intake Seizure", new InstantCommand(()-> CommandScheduler.getInstance().cancelAll())); } if (turret != null && drive != null && hood != null && shooter != null && spindexer != null){ -- 2.39.5