]> git.taranathan.com Git - FRC2026.git/commitdiff
some fixes
authoriefomit <timofei.stem@gmail.com>
Sun, 29 Mar 2026 05:07:45 +0000 (22:07 -0700)
committeriefomit <timofei.stem@gmail.com>
Sun, 29 Mar 2026 05:07:45 +0000 (22:07 -0700)
src/main/java/frc/robot/RobotContainer.java
src/main/java/frc/robot/commands/gpm/HardstopWarning.java
src/main/java/frc/robot/commands/gpm/RunSpindexer.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/subsystems/Intake/Intake.java

index f509b70d02a44dd8285b155df5b9a67770430a18..4d3eb8e7fb46f0d75d1c591db19b98fe97742b3d 100644 (file)
@@ -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"
 
index f55702dabab4b68ed694a7fd2a22aa19dec06e1e..4f0107f68dcc654c0b409efcb8fb4532c3cecec4 100644 (file)
@@ -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
index c0af90904f11c8ec8451465babeec705a8648a3d..c4459e71077476564b273d777ca6b4e56bad02fa 100644 (file)
@@ -23,7 +23,7 @@ public class RunSpindexer extends Command {
         this.turret = turret;
         this.hood = hood;
 
-        addRequirements(spindexer, hood);
+        addRequirements(spindexer);
     }
 
         // public RunSpindexer(Spindexer spindexer) {
index a65c1b097634c35f8eb8423d23701b62e5665d37..205e9b124b179879b54ed5f5dae0f8fb032945e2 100644 (file)
@@ -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(
index 126013e8fb46e31ed05b18705c365f29c83e6c9c..d42d8b1c6641968144009d3cb121fd83d6832d75 100644 (file)
@@ -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));