]> git.taranathan.com Git - FRC2026.git/commitdiff
controls changes and jostling
authormoo <160301629+moogoesmeow0@users.noreply.github.com>
Fri, 21 Aug 2026 01:55:04 +0000 (18:55 -0700)
committermoo <160301629+moogoesmeow0@users.noreply.github.com>
Fri, 21 Aug 2026 01:55:04 +0000 (18:55 -0700)
src/main/java/frc/robot/commands/gpm/IntakeMovementCommand.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/subsystems/Intake/Intake.java
src/main/java/frc/robot/subsystems/hood/Hood.java

index a623e61c2cb08d909ab9e86ac351bce773211ebb..aaeb45af76f6e21697ef0a8228424c70d91933d6 100644 (file)
@@ -6,7 +6,7 @@ import frc.robot.subsystems.Intake.Intake;
 
 public class IntakeMovementCommand extends Command {
     private final Intake intake;
-    private final double interval = 0.6; // Change this to make it faster/slower (seconds)
+    private final double interval = 0.7; // Change this to make it faster/slower (seconds)
 
     public IntakeMovementCommand(Intake intake) {
         this.intake = intake;
index 6a7caa8127be39a9a466fc64cc6ac2527ab14e07..9ae380ea128a41903d428fccdb193fbc48ac7338 100644 (file)
@@ -7,6 +7,7 @@ import edu.wpi.first.wpilibj.DriverStation.Alliance;
 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.Robot;
 import frc.robot.commands.gpm.IntakeMovementCommand;
 import frc.robot.commands.gpm.ReverseMotors;
@@ -94,7 +95,7 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
 
             // Make the intake go in and out while shooting
             controller.get(DPad.UP).whileTrue(new IntakeMovementCommand(intake)
-                .alongWith(new InstantCommand(()-> intakeBoolean = true)));
+                    .alongWith(new InstantCommand(() -> intakeBoolean = true)));
 
             // Calibration: you can now calibrate easily using this button
             if (hood != null && intake != null) {
@@ -108,11 +109,11 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
             }
 
             // Stop intake roller
-            controller.get(DPad.DOWN).onTrue(new InstantCommand(()->{
-                if(intakeBoolean){
+            controller.get(DPad.DOWN).onTrue(new InstantCommand(() -> {
+                if (intakeBoolean) {
                     intake.spinStart();
                     intakeBoolean = false;
-                } else{
+                } else {
                     intake.spinStop();
                     intakeBoolean = true;
                 }
@@ -123,9 +124,10 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
         if (spindexer != null && turret != null && hood != null && intake != null) {
 
             // Toggle spindexer
-            controller.get(PS5Button.LEFT_TRIGGER).toggleOnTrue(
-                new RunSpindexer(spindexer, turret, hood, intake)
-            );
+            controller.get(PS5Button.LEFT_TRIGGER).onTrue(
+                    new ParallelCommandGroup(new InstantCommand(() -> hood.forceHoodDown(false), hood),
+                            new RunSpindexer(spindexer, turret, hood, intake)))
+                    .onFalse(new InstantCommand(() -> hood.forceHoodDown(true), hood));
         }
 
         // Auto shoot
@@ -134,15 +136,14 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
             controller.get(PS5Button.SQUARE).toggleOnTrue(autoShoot);
         }
 
-    
         // Hood
         if (hood != null) {
             // Set the hood down -- for safety measures under trench
-            controller.get(DPad.LEFT).onTrue(new InstantCommand(()->{
-                hood.forceHoodDown(true);
-            }, hood)).onFalse(new InstantCommand(()->{
-                hood.forceHoodDown(false);
-            }));
+            // controller.get(DPad.LEFT).onTrue(new InstantCommand(()->{
+            // hood.forceHoodDown(true);
+            // }, hood)).onFalse(new InstantCommand(()->{
+            // hood.forceHoodDown(false);
+            // }));
         }
     }
 
index 59f105bd7ea41a52bbeeaac3d407bdf37b9ff7aa..6fcc8ca2c1c56e5470885d26fbf031e37c1d00c0 100644 (file)
@@ -73,7 +73,7 @@ public class Intake extends SubsystemBase implements IntakeIO{
 
         // max free speed (rot/s) = motor free speed (rad/s to rot/s)/ gear ratio
         // safety margin, limits velocity to .75 free speed
-        maxVelocity = 0.75 * maxFreeSpeed;
+        maxVelocity = 1.0 * maxFreeSpeed; //safety is for people with no pit team
         maxAcceleration = maxVelocity / 0.25;
 
         // ----Rollers
index 4bf9d345af00ddaa69c56bb1ed7f1051eda31279..5823a68f260c15cb929eeaf14d33aeb4ac3fe1cd 100644 (file)
@@ -36,7 +36,7 @@ public class Hood extends SubsystemBase implements HoodIO {
        private boolean calibrating = false;
        private Debouncer calibrateDebouncer = new Debouncer(0.5, DebounceType.kRising);
 
-       private boolean forceHoodDown = false;
+       private boolean forceHoodDown = true;
 
     private HoodIOInputsAutoLogged inputs = new HoodIOInputsAutoLogged();