44
55package frc .robot ;
66
7+ import edu .wpi .first .math .geometry .Rotation2d ;
78import edu .wpi .first .networktables .GenericEntry ;
89import edu .wpi .first .wpilibj .DriverStation .Alliance ;
910import edu .wpi .first .wpilibj .Joystick ;
2526import frc .robot .commands .drive .DriveAutonCommand ;
2627import frc .robot .commands .drive .DriveTeleopCommand ;
2728import frc .robot .commands .drive .ResetGyroCommand ;
29+ import frc .robot .commands .drive .XLockCommand ;
2830import frc .robot .commands .elbow .ClosedLoopElbowCommand ;
2931import frc .robot .commands .elbow .HoldElbowCommand ;
3032import frc .robot .commands .elbow .JogElbowClosedLoopCommand ;
33+ import frc .robot .commands .elbow .OpenLoopElbowCommand ;
3134import frc .robot .commands .elbow .ZeroElbowCommand ;
3235import frc .robot .commands .magazine .OpenLoopMagazineCommand ;
36+ import frc .robot .commands .robotState .AmpCommand ;
3337import frc .robot .commands .robotState .ClimbCommand ;
3438import frc .robot .commands .robotState .DecendCommand ;
39+ import frc .robot .commands .robotState .FullTrapClimbCommand ;
40+ import frc .robot .commands .robotState .IntakeCommand ;
3541import frc .robot .commands .robotState .PostClimbStowCommand ;
3642import frc .robot .commands .robotState .PrepClimbCommand ;
43+ import frc .robot .commands .robotState .ReleaseNoteCommand ;
3744import frc .robot .commands .robotState .ScoreTrapCommand ;
3845import frc .robot .commands .robotState .StowCommand ;
46+ import frc .robot .commands .robotState .SubWooferCommand ;
3947import frc .robot .commands .robotState .TrapCommand ;
4048import frc .robot .commands .robotState .TunedShotCommand ;
4149import frc .robot .commands .robotState .TuningOffCommand ;
6472import frc .robot .subsystems .vision .VisionSubsystem ;
6573import frc .robot .subsystems .wrist .WristIOSRX ;
6674import frc .robot .subsystems .wrist .WristSubsystem ;
75+ import java .util .Map ;
6776import org .strykeforce .telemetry .TelemetryController ;
6877import org .strykeforce .telemetry .TelemetryService ;
6978
@@ -132,8 +141,8 @@ public RobotContainer() {
132141 // testAutonPath.generateTrajectory();
133142
134143 configureDriverBindings ();
135- // configureOperatorBindings();
136- configureClimbTestBindings ();
144+ configureOperatorBindings ();
145+ // configureClimbTestBindings();
137146 // configureMatchDashboard();
138147 configurePitDashboard ();
139148 configureTuningDashboard ();
@@ -143,6 +152,14 @@ public RobotContainer() {
143152 // configurePitDashboard();
144153 }
145154
155+ public boolean hasElbowZeroed () {
156+ return elbowSubsystem .hasZeroed ();
157+ }
158+
159+ public void zeroElbow () {
160+ elbowSubsystem .zero ();
161+ }
162+
146163 public void configurePitDashboard () {
147164 Shuffleboard .getTab ("Pit" )
148165 .add (
@@ -208,6 +225,18 @@ public void configurePitDashboard() {
208225 climbSubsystem ))
209226 .withSize (1 , 1 )
210227 .withPosition (6 , 2 );
228+
229+ Shuffleboard .getTab ("Pit" )
230+ .add (
231+ "Full Trap Sequence" ,
232+ new FullTrapClimbCommand (robotStateSubsystem , climbSubsystem , superStructure ))
233+ .withSize (1 , 1 )
234+ .withPosition (7 , 2 );
235+
236+ Shuffleboard .getTab ("Pit" )
237+ .add ("Zero Climb" , new ZeroClimbCommand (climbSubsystem ))
238+ .withSize (1 , 1 )
239+ .withPosition (0 , 4 );
211240 }
212241 /*
213242 private void configureMatchDashboard() {
@@ -269,7 +298,6 @@ public void configureTelemetry() {
269298 robotStateSubsystem .registerWith (telemetryService );
270299 telemetryService .start ();
271300 }
272- /*
273301
274302 public void setAllianceColor (Alliance alliance ) {
275303 this .alliance = alliance ;
@@ -307,7 +335,7 @@ private void configureOperatorBindings() {
307335 .onTrue (new OpenLoopElbowCommand (elbowSubsystem , -0.1 ))
308336 .onFalse (new OpenLoopElbowCommand (elbowSubsystem , 0 ));
309337
310- // Open Loop Magazine
338+ // Amp Prep
311339 new JoystickButton (xboxController , XboxController .Button .kA .value )
312340 .onTrue (
313341 new AmpCommand (
@@ -318,10 +346,11 @@ private void configureOperatorBindings() {
318346
319347 // new JoystickButton(xboxController, XboxController.Button.kX.value).onTrue(testAutonPath);
320348
321- new JoystickButton(xboxController, XboxController.Button.kY.value)
322- .onTrue(
323- new PodiumCommand(
324- robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
349+ // Podium Prep
350+ // new JoystickButton(xboxController, XboxController.Button.kY.value)
351+ // .onTrue(
352+ // new PodiumCommand(
353+ // robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
325354
326355 // SubWoofer
327356 new JoystickButton (xboxController , XboxController .Button .kX .value )
@@ -332,31 +361,12 @@ private void configureOperatorBindings() {
332361 .onTrue (
333362 new StowCommand (
334363 robotStateSubsystem , superStructure , magazineSubsystem , intakeSubsystem ));
335- // // Amp Command
336- // new JoystickButton(xboxController, XboxController.Button.kX.value)
337- // .onTrue(new AmpCommand(robotStateSubsystem, superStructure, magazineSubsystem));
338-
339- // // Intake Command
340- // new JoystickButton(xboxController, XboxController.Button.kX.value)
341- // .onTrue(
342- // new IntakeCommand(
343- // robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
344-
345- // // Open Loop Intake Command
346- // new JoystickButton(xboxController, XboxController.Button.kA.value)
347- // .onTrue(new OpenLoopIntakeCommand(intakeSubsystem, 50));
348-
349- // new JoystickButton(xboxController, XboxController.Button.kB.value)
350- // .onTrue(new OpenLoopIntakeCommand(intakeSubsystem, 0.0));
351-
352- // // Stow Command
353- // new JoystickButton(xboxController, XboxController.Button.kX.value)
354- // .onTrue(
355- // new StowCommand(
356- // robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
357- }
358364
359- */
365+ // // Climb Prep
366+ // new JoystickButton(xboxController, XboxController.Button.kStart.value).onTrue(new
367+ // PrepClimbCommand(robotStateSubsystem, climbSubsystem, superStructure));
368+
369+ }
360370
361371 private void configureDriverBindings () {
362372 FlyskyJoystick flysky = new FlyskyJoystick (driveJoystick );
@@ -369,21 +379,9 @@ private void configureDriverBindings() {
369379 driveSubsystem ,
370380 robotStateSubsystem ));
371381
372- // // Vision Shoot Command
373- // new JoystickButton(driveJoystick, Button.SWD.id)
374- // .onTrue(new VisionShootCommand(robotStateSubsystem, superStructure,
375- // magazineSubsystem));
376-
377- // // Stow Command
378- // new JoystickButton(driveJoystick, Button.SWD.id)
379- // .onTrue(
380- // new StowCommand(
381- // robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
382-
383382 // Reset Gyro Command
384383 new JoystickButton (driveJoystick , Button .M_SWC .id ).onTrue (new ResetGyroCommand (driveSubsystem ));
385384
386- /*
387385 // Intake
388386 new JoystickButton (driveJoystick , Button .SWB_DWN .id )
389387 .onTrue (
@@ -398,6 +396,7 @@ private void configureDriverBindings() {
398396 .onTrue (new XLockCommand (driveSubsystem ))
399397 .onFalse (new XLockCommand (driveSubsystem ));
400398
399+ // Stow Command
401400 new JoystickButton (driveJoystick , Button .SWA .id )
402401 .onTrue (
403402 new StowCommand (
@@ -406,31 +405,24 @@ private void configureDriverBindings() {
406405 new StowCommand (
407406 robotStateSubsystem , superStructure , magazineSubsystem , intakeSubsystem ));
408407
409- // Shoot
410- new JoystickButton(driveJoystick, Button.M_SWH.id)
411- .onTrue(new SubWooferCommand(robotStateSubsystem, superStructure, magazineSubsystem));
408+ // // Vision Shoot
409+ // new JoystickButton(driveJoystick, Button.M_SWH.id)
410+ // .onTrue(new VisionShootCommand(robotStateSubsystem, superStructure, magazineSubsystem,
411+ // intakeSubsystem));
412412
413413 // Release Game Piece Command
414414 new JoystickButton (driveJoystick , Button .M_SWE .id )
415415 .onTrue (new ReleaseNoteCommand (robotStateSubsystem , superStructure , magazineSubsystem ));
416416
417+ // Subwoofer Shoot
417418 new JoystickButton (driveJoystick , Button .SWG_UP .id )
418- .onTrue(
419- new VisionShootCommand(
420- robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
419+ .onTrue (new SubWooferCommand (robotStateSubsystem , superStructure , magazineSubsystem ));
421420 new JoystickButton (driveJoystick , Button .SWG_UP .id )
422- .onFalse(
423- new VisionShootCommand(
424- robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
421+ .onFalse (new SubWooferCommand (robotStateSubsystem , superStructure , magazineSubsystem ));
425422 new JoystickButton (driveJoystick , Button .SWG_DWN .id )
426- .onTrue(
427- new VisionShootCommand(
428- robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
423+ .onTrue (new SubWooferCommand (robotStateSubsystem , superStructure , magazineSubsystem ));
429424 new JoystickButton (driveJoystick , Button .SWG_DWN .id )
430- .onFalse(
431- new VisionShootCommand(
432- robotStateSubsystem, superStructure, magazineSubsystem, intakeSubsystem));
433- */
425+ .onFalse (new SubWooferCommand (robotStateSubsystem , superStructure , magazineSubsystem ));
434426 }
435427
436428 public void configureClimbTestBindings () {
0 commit comments