]> git.taranathan.com Git - FRC2026.git/commitdiff
Update PS5ControllerDriverConfig.java
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 20 Feb 2026 21:52:41 +0000 (13:52 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 20 Feb 2026 21:52:41 +0000 (13:52 -0800)
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java

index 62dfb8795649dcebb1613b5457cbaa960d1ffffe..e48786a82c7d7743398c9df1e929ee01feae473e 100644 (file)
@@ -82,11 +82,24 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
                     intake.spinStart();
                     intakeBoolean = false;
                 } else {
-                    intake.retract();
+                    intake.intermediateExtend();
                     intake.spinStop();
                     intakeBoolean = true;
                 }
             }));
+
+            // Retract if hold for 3 seconds
+            driver.get(PS5Button.CROSS).debounce(3.0).onTrue(new InstantCommand(()->{
+                intake.retract();
+                intakeBoolean = true;
+            }));
+        }
+
+        // Spindexer
+        if (spindexer != null){
+            // Will only run if we are not calling default shoot command
+            driver.get(PS5Button.LB).onTrue(new InstantCommand(()-> spindexer.maxSpindexer()))
+            .onFalse(new InstantCommand(()-> spindexer.stopSpindexer()));
         }
 
         // Auto shoot