@@ -74,13 +74,13 @@ public class RobotContainer {
7474 private final ledSubsystem leds ;
7575 private final Climb climb ;
7676
77- private final boolean compititionBindings = true ;
77+ private final boolean compititionBindings = false ;
7878 private final boolean driveEnabled = true ;
79- private final boolean wristEnabled = true ;
80- private final boolean manipulatorEnabled = true ;
81- private final boolean intakeEnabled = false ;
79+ private final boolean wristEnabled = false ;
80+ private final boolean manipulatorEnabled = false ;
81+ private final boolean intakeEnabled = true ;
8282 private final boolean passthroughEnabled = false ;
83- private final boolean elevatorEnabled = true ;
83+ private final boolean elevatorEnabled = false ;
8484 private final boolean servoEnabled = false ;
8585 private final boolean ledEnabled = false ;
8686 private final boolean climbEnabled = false ;
@@ -167,33 +167,27 @@ private Command getOutakeCommand(ElevatorHeight height, Trigger trigger){
167167 }
168168
169169 command = command .until (() -> trigger .getAsBoolean () == false )
170- .finallyDo (() -> {
171- new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .L2L3 )
170+ .andThen (new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .L2L3 ))
172171 .withInterruptBehavior (InterruptionBehavior .kCancelSelf )
173- . schedule ();
174- } );
172+ . andThen ( new ElevatorGoToPositionPositionCommand ( elevator , ElevatorHeight . PASSTHROUGH ))
173+ . withInterruptBehavior ( InterruptionBehavior . kCancelSelf );
175174
176175 return command ;
177176 }
178177
179- public Command getFunnelIntakeCommand (Trigger trigger )
178+ public Command getFunnelIntakeCommand ()
180179 {
181180 // Note need to make sure to set the intake at half stow position here
182181
183182 return new SequentialCommandGroup (
184183 new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .L2L3 ),
185184 new ElevatorGoToPositionPositionCommand (elevator , ElevatorHeight .FUNNEL ),
186- new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .L2L3 ),
185+ new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .FUNNEL_ANGLE ),
187186 new IntakeCoralCommand (manipulator , passthrough ))
188- .withInterruptBehavior (InterruptionBehavior .kCancelSelf )
189- .until (
190- () -> manipulator .isDetectingCoral () || trigger .getAsBoolean () == false )
191- .finallyDo (() -> {
192- new SequentialCommandGroup (new InstantCommand ( () -> manipulator .stopOuttake ()),
193- new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .L2L3 ))
187+ .andThen (
188+ new SequentialCommandGroup (new InstantCommand ( () -> manipulator .stopOuttake ())))
189+ .andThen (new WristGoToPositionCommand (wrist , Constants .WristConstants .WristAngleRad .L2L3 ))
194190 .withInterruptBehavior (InterruptionBehavior .kCancelSelf )
195- .schedule ();
196- })
197191 .unless (() -> manipulator .isDetectingCoral ());
198192 }
199193
@@ -209,7 +203,8 @@ private void configureButtonBindings() {
209203
210204 // Funnel Intake
211205 Trigger bPressedTrigger = operatorController .b ();
212- bPressedTrigger .onTrue (this .getFunnelIntakeCommand (bPressedTrigger ));
206+ //bPressedTrigger.whileTrue(this.getFunnelIntakeCommand());
207+ bPressedTrigger .onTrue (this .getFunnelIntakeCommand ());
213208
214209 // L1 and L2 Binding
215210 Trigger aPressedTrigger = operatorController .a ();
@@ -230,7 +225,7 @@ private void configureButtonBindings() {
230225 DoubleSupplier horizontalAxis = () -> operatorController .getRightX ();
231226 climb .setDefaultCommand (new ManualClimbCommand (climb , horizontalAxis ));
232227
233- // Start button is meant to prepare for the climb. Drops the funnel and moves the
228+ // Start button is meant to prepare for the climb. Drops the funnel and moves the
234229 // floor intake back
235230 Trigger startButton = operatorController .start ();
236231
@@ -289,36 +284,6 @@ public Command getAutonomousCommand() {
289284 }
290285 }
291286
292-
293-
294-
295-
296-
297-
298-
299-
300-
301-
302-
303-
304-
305-
306-
307-
308-
309-
310-
311-
312-
313-
314-
315-
316-
317-
318-
319-
320-
321-
322287 // ============= Instantiation =============
323288
324289
@@ -466,13 +431,24 @@ private void configureIntakeBindings() {
466431 Trigger mainTrigger = new JoystickButton (flightStick , 1 );
467432 mainTrigger .whileTrue (Commands .runOnce (() -> {intake .goToExtendedPosition ();}, intake ));
468433 mainTrigger .whileFalse (Commands .runOnce (() -> {intake .goToRetractedPosition ();}, intake ));
434+
435+ Trigger aButton = operatorController .a ();
436+ aButton .onTrue (new IntakeCommand (intake , INTAKE_POSITION .HALF_STOW ));
437+
438+ Trigger xButton = operatorController .x ();
439+ xButton .onTrue (new IntakeCommand (intake , INTAKE_POSITION .STOW ));
440+
441+ Trigger yButton = operatorController .y ();
442+ yButton .onTrue (new IntakeCommand (intake , INTAKE_POSITION .CLIMB ));
443+
469444 }
470445
471446
472447 public enum INTAKE_POSITION {
473448 INTAKE ,
474449 HALF_STOW ,
475- STOW
450+ STOW ,
451+ CLIMB
476452 }
477453
478454 public enum CLIMB_POSITION {
0 commit comments