From 93e6184e0210cd1eef2c62c0586356af98a2279f Mon Sep 17 00:00:00 2001 From: iefomit Date: Wed, 22 Apr 2026 21:02:14 -0700 Subject: [PATCH] -imports, other fixes --- src/main/java/frc/robot/RobotContainer.java | 6 +++++- src/main/java/frc/robot/commands/LogCommand.java | 5 ++++- .../frc/robot/commands/auto_comm/DynamicAutoBuilder.java | 6 ------ .../java/frc/robot/commands/gpm/RunSpindexerWithStop.java | 5 ----- .../java/frc/robot/controls/PS5ControllerDriverConfig.java | 1 - src/main/java/frc/robot/util/PathGroupLoader.java | 2 +- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 0c8dc64..63deb64 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -21,7 +21,6 @@ import edu.wpi.first.wpilibj2.command.InstantCommand; import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import frc.robot.commands.DoNothing; import frc.robot.commands.LogCommand; -import frc.robot.commands.Music; import frc.robot.commands.auto_comm.DynamicAutoBuilder; import frc.robot.commands.drive_comm.DefaultDriveCommand; import frc.robot.commands.gpm.IntakeMovementCommand; @@ -244,6 +243,11 @@ public class RobotContainer { hood.forceHoodDown(false); })); } + + NamedCommands.registerCommand("After Depot", new InstantCommand()); + NamedCommands.registerCommand("Constraints Zone", new InstantCommand()); + NamedCommands.registerCommand("Depot", new InstantCommand()); + NamedCommands.registerCommand("Reset Spindexer", new InstantCommand()); } public void addAuto(String name) { diff --git a/src/main/java/frc/robot/commands/LogCommand.java b/src/main/java/frc/robot/commands/LogCommand.java index 6392304..3340971 100644 --- a/src/main/java/frc/robot/commands/LogCommand.java +++ b/src/main/java/frc/robot/commands/LogCommand.java @@ -4,7 +4,6 @@ import org.littletonrobotics.junction.Logger; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.constants.Constants; -import frc.robot.subsystems.spindexer.Spindexer; import frc.robot.util.Elastic; import frc.robot.util.HubActive; import frc.robot.util.Elastic.Notification; @@ -19,6 +18,10 @@ public class LogCommand extends Command { @Override public void execute() { + if (Constants.DISABLE_LOGGING) { + return; + } + boolean current = HubActive.isHubActive(); Logger.recordOutput("HubActive", current); diff --git a/src/main/java/frc/robot/commands/auto_comm/DynamicAutoBuilder.java b/src/main/java/frc/robot/commands/auto_comm/DynamicAutoBuilder.java index 1fcdf01..d219996 100644 --- a/src/main/java/frc/robot/commands/auto_comm/DynamicAutoBuilder.java +++ b/src/main/java/frc/robot/commands/auto_comm/DynamicAutoBuilder.java @@ -1,14 +1,8 @@ package frc.robot.commands.auto_comm; -import edu.wpi.first.math.geometry.Translation2d; -import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj2.command.*; -import frc.robot.commands.gpm.IntakeCommand; -import frc.robot.commands.gpm.RunSpindexer; import frc.robot.commands.gpm.RunSpindexerWithStop; import frc.robot.subsystems.Intake.Intake; -import frc.robot.subsystems.PowerControl.BreakerConstants; -import frc.robot.subsystems.PowerControl.EMABreaker; import frc.robot.subsystems.drivetrain.Drivetrain; import frc.robot.subsystems.hood.Hood; import frc.robot.subsystems.spindexer.Spindexer; diff --git a/src/main/java/frc/robot/commands/gpm/RunSpindexerWithStop.java b/src/main/java/frc/robot/commands/gpm/RunSpindexerWithStop.java index 2a08f33..b3f592b 100644 --- a/src/main/java/frc/robot/commands/gpm/RunSpindexerWithStop.java +++ b/src/main/java/frc/robot/commands/gpm/RunSpindexerWithStop.java @@ -2,16 +2,11 @@ package frc.robot.commands.gpm; import org.littletonrobotics.junction.Logger; -import com.pathplanner.lib.auto.NamedCommands; - import edu.wpi.first.math.filter.Debouncer; import edu.wpi.first.math.filter.Debouncer.DebounceType; -import edu.wpi.first.units.measure.Time; import edu.wpi.first.wpilibj.Timer; 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 frc.robot.constants.Constants; import frc.robot.subsystems.Intake.Intake; import frc.robot.subsystems.Intake.IntakeConstants; diff --git a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java index fb8dfd3..6a7caa8 100644 --- a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java +++ b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java @@ -11,7 +11,6 @@ import frc.robot.Robot; import frc.robot.commands.gpm.IntakeMovementCommand; import frc.robot.commands.gpm.ReverseMotors; import frc.robot.commands.gpm.RunSpindexer; -import frc.robot.commands.gpm.RunSpindexerWithStop; import frc.robot.commands.gpm.Superstructure; import frc.robot.constants.Constants; import frc.robot.subsystems.Intake.Intake; diff --git a/src/main/java/frc/robot/util/PathGroupLoader.java b/src/main/java/frc/robot/util/PathGroupLoader.java index b1db28c..0708d53 100644 --- a/src/main/java/frc/robot/util/PathGroupLoader.java +++ b/src/main/java/frc/robot/util/PathGroupLoader.java @@ -31,7 +31,7 @@ public class PathGroupLoader { if (file.isFile() && file.getName().contains(".")) { try { long startTime = System.nanoTime(); - String name = file.getName().substring(0, file.getName().indexOf(".")); + String name = file.getName().substring(0, file.getName().lastIndexOf(".")); // pathGroups.put(name, PathPlannerAuto.getPathGroupFromAutoFile(name)); pathGroups.put(name, PathPlannerPath.fromPathFile(name)); double time = (System.nanoTime() - startTime) / 1000000.0; -- 2.39.5