]> git.taranathan.com Git - FRC2026.git/commitdiff
hood
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 27 Feb 2026 06:58:53 +0000 (22:58 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 27 Feb 2026 06:58:53 +0000 (22:58 -0800)
src/main/java/frc/robot/commands/gpm/ReverseMotors.java
src/main/java/frc/robot/commands/gpm/Superstructure.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java

index 124e3ea537d33880ba06ae6e4488473e4850b584..eb884e16b02a9450751bb6fcf80c34a4f49891fe 100644 (file)
@@ -13,7 +13,7 @@ public class ReverseMotors extends Command {
         this.intake = intake;
         this.spindexer = spindexer;
 
-        addRequirements(intake, spindexer);
+        addRequirements(intake);
     }
 
     @Override
index 2feca004826c339c583e58bcbc54ccd26bfc20fb..dfb0ba9cb4e14f13fc3824fca25c429b84b3762d 100644 (file)
@@ -78,7 +78,7 @@ public class Superstructure extends Command {
                                FieldConstants.getHubTranslation().minus(new Translation3d(drivepose.getTranslation())),
                                8.0); // Random initial goalState to prevent it being null
         
-        addRequirements(turret, shooter, hood);
+        addRequirements(turret, shooter);
     }
 
     public void updateSetpoints(Pose2d drivepose) {
index 6366ca05b55f2180e80e8a85b6e76f741574f027..dd5e1710d85037315374f79fb297401929b1fd74 100644 (file)
@@ -23,6 +23,7 @@ import frc.robot.subsystems.shooter.Shooter;
 import frc.robot.subsystems.spindexer.Spindexer;
 import frc.robot.subsystems.turret.Turret;
 import frc.robot.subsystems.hood.Hood;
+import frc.robot.subsystems.hood.HoodConstants;
 import frc.robot.subsystems.Intake.Intake;
 import lib.controllers.PS5Controller;
 import lib.controllers.PS5Controller.DPad;
@@ -92,8 +93,9 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
                 }));
 
         // Reverse motors
-        if (intake != null && spindexer != null && shooter != null) {
+        if (intake != null && spindexer != null) {
             controller.get(PS5Button.CIRCLE).whileTrue(new ReverseMotors(intake, spindexer));
+            controller.get(PS5Button.LB).whileTrue(new ReverseMotors(intake, spindexer));
         }
 
         // Intake
@@ -178,6 +180,11 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
             })).onFalse(new InstantCommand(() -> {
                 hood.stopCalibrating();
             }));
+
+            // Set the hood down -- for safety measures under trench
+            controller.get(DPad.RIGHT).whileTrue(new InstantCommand(()->{
+                hood.setFieldRelativeTarget(Rotation2d.fromDegrees(HoodConstants.MAX_ANGLE), 0.0);
+            }, hood));
         }
     }