]> git.taranathan.com Git - FRC2026.git/commitdiff
Update PS5ControllerDriverConfig.java
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 21 Feb 2026 22:43:30 +0000 (14:43 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 21 Feb 2026 22:43:30 +0000 (14:43 -0800)
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java

index 61b6d171bd11d32d61e58849c26c6d1e02de7d34..4527288f5a3c6977ce5d1919e811e3bea208ddef 100644 (file)
@@ -87,12 +87,15 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
                 reverseMotors.schedule();
             })
             ).onFalse(new InstantCommand(()->{
-                reverseMotors.cancel();
+                if(reverseMotors != null){
+                    reverseMotors.cancel();
+                }
             }));
         }
 
         // Intake
         if (intake != null) {
+            // Toggle intake
             driver.get(PS5Button.RIGHT_TRIGGER).onTrue(new InstantCommand(() -> {
                 if (intakeBoolean) {
                     intake.extend();