@@ -40,7 +40,7 @@ public class RobotContainer {
4040 // used to determine which section of the reef to score on, defaults at start to pole to front and
4141 // left of driver
4242 private int reefSection = 7 ;
43-
43+ public static boolean stopGrab = false ;
4444 // slows down robot during pickup
4545 private Command pickup =
4646 coral
@@ -206,19 +206,19 @@ private void configureBindings() {
206206 // when b is pressed and if auto is disabled, raises elevator for l1 scoring, when left stick is
207207 // pressed, completes scoring motion
208208 // is auto is enabled, automatically goes to previously selected reef section and l1 scores
209- controller
210- .b ()
211- .whileTrue (
212- Commands .deferredProxy (
213- () -> {
214- if (autoDisabled ) {
215- return Commands .startEnd (
216- () -> speedMultiplier = 0.25 , () -> speedMultiplier = 1.0 )
217- .withDeadline (coral .l1Score (controller .leftStick ()));
218- } else {
219- return coral .goToReef (drivetrain , () -> reefSection , () -> 0 );
220- }
221- }));
209+ /* controller
210+ .b()
211+ .whileTrue(
212+ Commands.deferredProxy(
213+ () -> {
214+ if (autoDisabled) {
215+ return Commands.startEnd(
216+ () -> speedMultiplier = 0.25, () -> speedMultiplier = 1.0)
217+ .withDeadline(coral.l1Score(controller.leftStick()));
218+ } else {
219+ return coral.goToReef(drivetrain, () -> reefSection, () -> 0);
220+ }
221+ }));*/
222222
223223 // clearing algae off reef, down on plus for l1 clear, right on plus for l2 clear
224224 controller .povDown ().onTrue (coral .l1ReefClear (controller .leftStick ()));
@@ -248,6 +248,8 @@ private void configureBindings() {
248248 // when left plus pressed, disable or enable auto, defaults at disabled
249249 controller .povLeft ().onTrue (Commands .runOnce (() -> autoDisabled = !autoDisabled ));
250250 controller .back ().onTrue (Commands .runOnce (() -> gyro .zeroYaw ()));
251+ controller .leftStick ().onTrue (Commands .runOnce (() -> stopGrab = true ));
252+ controller .leftStick ().onFalse (Commands .runOnce (() -> stopGrab = false ));
251253 }
252254
253255 // deadbands for driving
0 commit comments