From: iefomit Date: Sun, 29 Mar 2026 05:07:45 +0000 (-0700) Subject: some fixes X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=96ee6c494399666f849690e53fbb6512a37ab9c5;p=FRC2026.git some fixes --- diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index f509b70..4d3eb8e 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -23,7 +23,6 @@ import frc.robot.commands.LogCommand; import frc.robot.commands.drive_comm.DefaultDriveCommand; import frc.robot.commands.gpm.AutoShootCommand; import frc.robot.commands.gpm.ClimbDriveCommand; -// import frc.robot.commands.gpm.HardstopWarning; import frc.robot.commands.gpm.IntakeMovementCommand; import frc.robot.commands.gpm.RunSpindexer; import frc.robot.commands.gpm.Superstructure; @@ -112,8 +111,7 @@ public class RobotContainer { hood = new Hood(); case TwinBot: - spindexer = new Spindexer(); - intake = new Intake(); + break; case SwerveCompetition: // AKA "Vantage" diff --git a/src/main/java/frc/robot/commands/gpm/HardstopWarning.java b/src/main/java/frc/robot/commands/gpm/HardstopWarning.java index f55702d..4f0107f 100644 --- a/src/main/java/frc/robot/commands/gpm/HardstopWarning.java +++ b/src/main/java/frc/robot/commands/gpm/HardstopWarning.java @@ -6,19 +6,14 @@ import frc.robot.constants.IntakeConstants; import frc.robot.subsystems.Intake.Intake; import frc.robot.subsystems.hood.Hood; import frc.robot.subsystems.hood.HoodConstants; -import frc.robot.subsystems.turret.Turret; public class HardstopWarning extends Command { private Hood hood; private Intake intake; - private Turret turret; - private String turretStatus; - public HardstopWarning(Hood hood, Intake intake, Turret turret) { + public HardstopWarning(Hood hood, Intake intake) { this.hood = hood; this.intake = intake; - this.turret = turret; - turretStatus = "Unknown"; } @Override @@ -31,16 +26,6 @@ public class HardstopWarning extends Command { double epsilon = 0.05; SmartDashboard.putBoolean("Hood OK", hood.getPositionDeg() >= HoodConstants.MIN_ANGLE - epsilon); SmartDashboard.putBoolean("Intake OK", intake.getPosition() >= IntakeConstants.STARTING_POINT - epsilon); - - // if (Math.abs(turret.getPositionRad()) <= epsilon) { - // var encoderPositions = turret.getEncoderPositions(); - // if (Math.abs(encoderPositions.getFirst()) <= epsilon && Math.abs(encoderPositions.getSecond()) <= epsilon) - // turretStatus = "Ok"; - // else - // turretStatus = "Bad"; - // } - - SmartDashboard.putString("Turret Status", turretStatus); } @Override diff --git a/src/main/java/frc/robot/commands/gpm/RunSpindexer.java b/src/main/java/frc/robot/commands/gpm/RunSpindexer.java index c0af909..c4459e7 100644 --- a/src/main/java/frc/robot/commands/gpm/RunSpindexer.java +++ b/src/main/java/frc/robot/commands/gpm/RunSpindexer.java @@ -23,7 +23,7 @@ public class RunSpindexer extends Command { this.turret = turret; this.hood = hood; - addRequirements(spindexer, hood); + addRequirements(spindexer); } // public RunSpindexer(Spindexer spindexer) { diff --git a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java index a65c1b0..205e9b1 100644 --- a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java +++ b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java @@ -142,7 +142,7 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig { } // Spindexer - if (spindexer != null) { + if (spindexer != null && turret != null && hood != null) { // Toggle spindexer controller.get(PS5Button.LEFT_TRIGGER).toggleOnTrue( diff --git a/src/main/java/frc/robot/subsystems/Intake/Intake.java b/src/main/java/frc/robot/subsystems/Intake/Intake.java index 126013e..d42d8b1 100644 --- a/src/main/java/frc/robot/subsystems/Intake/Intake.java +++ b/src/main/java/frc/robot/subsystems/Intake/Intake.java @@ -126,7 +126,7 @@ public class Intake extends SubsystemBase implements IntakeIO{ leftMotor.getConfigurator().apply(config); leftMotor.getConfigurator().apply( - new MotorOutputConfigs().withInverted(InvertedValue.Clockwise_Positive) + new MotorOutputConfigs().withInverted(InvertedValue.CounterClockwise_Positive) .withNeutralMode(NeutralModeValue.Coast) ); @@ -241,7 +241,7 @@ public class Intake extends SubsystemBase implements IntakeIO{ * @param setpoint in inches */ public void setPosition(double setpoint) { - double motorRotations = -inchesToRotations(setpoint); + double motorRotations = inchesToRotations(setpoint); rightMotor.setControl(voltageRequest.withPosition(motorRotations)); leftMotor.setControl(voltageRequest.withPosition(motorRotations));