From 86aa57750f7f3b470920fb0831c3561401c73eed Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 30 May 2026 19:26:42 -0700 Subject: [PATCH 1/5] mapping buttons Co-Authored-By: lameesnotlame <258483139+lameesnotlame@users.noreply.github.com> --- src/main/java/frc/robot/RobotContainer.java | 50 +++++++++++++++++---- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 08a9c8f..2185b62 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -22,8 +22,17 @@ import frc.robot.DeviceIDs.controllerIDs; import frc.robot.commands.AddVisionMeasurement; import frc.robot.commands.ResetPose; +import frc.robot.commands.states.EjectingHopper; import frc.robot.commands.states.Intaking; +import frc.robot.commands.states.PrepAnywhere; +import frc.robot.commands.states.PrepCorner; +import frc.robot.commands.states.PrepHub; +import frc.robot.commands.states.PrepNeautralToAlliance; +import frc.robot.commands.states.PrepOpponentToAlliance; +import frc.robot.commands.states.PrepTower; +import frc.robot.commands.states.PrepTrench; import frc.robot.commands.states.RetractIntake; +import frc.robot.commands.states.ReversingShooter; import frc.robot.commands.states.Shooting; import frc.robot.constants.ConstSystem; import frc.robot.constants.ConstSystem.constControllers; @@ -59,13 +68,24 @@ public class RobotContainer { private final StateMachine loggedStateMachineInstance = stateMachineInstance; public static final RobotPoses robotPose = new RobotPoses(); private final RobotPoses loggedRobotPose = robotPose; + public static final Intaking intaking = new Intaking(); + public static final EjectingHopper ejectingHopper = new EjectingHopper(); public static final RetractIntake retracting = new RetractIntake(); + public static final Shooting shooting = new Shooting(); + public static final ReversingShooter reversingShooter = new ReversingShooter(); + public static final PrepHub prepHub = new PrepHub(); + public static final PrepCorner prepCorner = new PrepCorner(); + public static final PrepTrench prepTrench = new PrepTrench(); + public static final PrepNeautralToAlliance prepNeautralToAlliance = new PrepNeautralToAlliance(); + public static final PrepTower prepTower = new PrepTower(); + public static final PrepAnywhere prepAnywhere = new PrepAnywhere(); + public static final PrepOpponentToAlliance prepOpponentToAlliance = new PrepOpponentToAlliance(); + public static final Vision visionInstance = new Vision(); private final Vision loggedVisionInstance = visionInstance; public static final Telemetry telemetryInstance = new Telemetry(); private final Telemetry loggedTelemetryInstance = telemetryInstance; - public static final Shooting shooting = new Shooting(); public static final ResetPose resetPose = new ResetPose(); Command TRY_NONE = Commands.deferredProxy( () -> stateMachineInstance.tryState(RobotState.NONE)); @@ -102,16 +122,30 @@ public RobotContainer() { } private void configDriverBindings() { - conDriver.btn_RightTrigger + conDriver.btn_LeftTrigger .whileTrue(intaking); conDriver.btn_RightBumper - .whileTrue(retracting); - // Example Pose Drive - conDriver.btn_X - .whileTrue(EXAMPLE_POSE_DRIVE) - .onFalse(Commands.runOnce(() -> driverStateMachineInstance.setDriverState(DriverState.MANUAL))); - conDriver.btn_LeftTrigger + .onTrue(retracting); + conDriver.btn_South + .whileTrue(ejectingHopper); + conDriver.btn_RightTrigger .whileTrue(shooting); + conDriver.btn_A + .whileTrue(); + conDriver.btn_B + .whileTrue(); + conDriver.btn_X + .whileTrue(); + conDriver.btn_Y + .whileTrue(); + conDriver.btn_RightBumper + .whileTrue(); + + // Example Pose Drive + // conDriver.btn_X + // .whileTrue(EXAMPLE_POSE_DRIVE) + // .onFalse(Commands.runOnce(() -> + // driverStateMachineInstance.setDriverState(DriverState.MANUAL))); conDriver.btn_North .onTrue(resetPose); } From 71d116a474aa6812ef4a4f9e86fa5bc164d91d04 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 30 May 2026 20:27:26 -0700 Subject: [PATCH 2/5] buttons mappin Co-Authored-By: jayden mendoza <244560677+jaymendo670-png@users.noreply.github.com> --- src/main/java/frc/robot/RobotContainer.java | 62 ++++++++++++++------- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 2185b62..60f63bc 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -69,26 +69,44 @@ public class RobotContainer { public static final RobotPoses robotPose = new RobotPoses(); private final RobotPoses loggedRobotPose = robotPose; - public static final Intaking intaking = new Intaking(); - public static final EjectingHopper ejectingHopper = new EjectingHopper(); - public static final RetractIntake retracting = new RetractIntake(); - public static final Shooting shooting = new Shooting(); - public static final ReversingShooter reversingShooter = new ReversingShooter(); - public static final PrepHub prepHub = new PrepHub(); - public static final PrepCorner prepCorner = new PrepCorner(); - public static final PrepTrench prepTrench = new PrepTrench(); - public static final PrepNeautralToAlliance prepNeautralToAlliance = new PrepNeautralToAlliance(); - public static final PrepTower prepTower = new PrepTower(); - public static final PrepAnywhere prepAnywhere = new PrepAnywhere(); - public static final PrepOpponentToAlliance prepOpponentToAlliance = new PrepOpponentToAlliance(); - public static final Vision visionInstance = new Vision(); private final Vision loggedVisionInstance = visionInstance; public static final Telemetry telemetryInstance = new Telemetry(); private final Telemetry loggedTelemetryInstance = telemetryInstance; public static final ResetPose resetPose = new ResetPose(); - Command TRY_NONE = Commands.deferredProxy( - () -> stateMachineInstance.tryState(RobotState.NONE)); + + Command TRY_INTAKING = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.INTAKING)); + + Command TRY_SHOOTING = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.SHOOTING)); + + Command TRY_EJECTING_HOPPER = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.EJECTING_HOPPER)); + + Command TRY_REVERSING_SHOOTER = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.REVERSING_SHOOTER)); + + Command TRY_PREPANYWHERE = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_ANYWHERE)); + + Command TRY_PREPTRENCH = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_TRENCH)); + + Command TRY_PREPNEAUTRALTOALLIANCE = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_NEUTRAL_TO_ALLIANCE)); + + Command TRY_PREPOPPONENTOALLIANCE = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_OPPONENT_TO_ALLIANCE)); + + Command TRY_PREPTOWER = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_TOWER)); + + Command TRY_PREPHUB = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_HUB)); + + Command TRY_PREPCORNER = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_CORNER)); Command MANUAL = new DeferredCommand( driverStateMachineInstance.tryState( @@ -128,18 +146,22 @@ private void configDriverBindings() { .onTrue(retracting); conDriver.btn_South .whileTrue(ejectingHopper); + conDriver.btn_East + .whileTrue(reversingShooter); + conDriver.btn_West + .onTrue(prepNeautralToAlliance); conDriver.btn_RightTrigger .whileTrue(shooting); conDriver.btn_A - .whileTrue(); + .onTrue(prepTrench); conDriver.btn_B - .whileTrue(); + .onTrue(prepCorner); conDriver.btn_X - .whileTrue(); + .onTrue(prepTower); conDriver.btn_Y - .whileTrue(); + .onTrue(prepHub); conDriver.btn_RightBumper - .whileTrue(); + .onTrue(prepAnywhere); // Example Pose Drive // conDriver.btn_X From c823519b14ce179f38be2aa1325a09c9c0b59be0 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 30 May 2026 20:31:50 -0700 Subject: [PATCH 3/5] button mapping Co-Authored-By: jayden mendoza <244560677+jaymendo670-png@users.noreply.github.com> --- src/main/java/frc/robot/RobotContainer.java | 25 ++++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 60f63bc..6df21c3 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -108,6 +108,9 @@ public class RobotContainer { Command TRY_PREPCORNER = Commands.deferredProxy( () -> stateMachineInstance.tryState(RobotState.PREP_CORNER)); + Command TRY_RETRACTING = Commands.deferredProxy( + () -> stateMachineInstance.tryState(RobotState.PREP_CORNER)); + Command MANUAL = new DeferredCommand( driverStateMachineInstance.tryState( DriverStateMachine.DriverState.MANUAL, @@ -141,27 +144,27 @@ public RobotContainer() { private void configDriverBindings() { conDriver.btn_LeftTrigger - .whileTrue(intaking); + .whileTrue(TRY_INTAKING); conDriver.btn_RightBumper - .onTrue(retracting); + .onTrue(TRY_RETRACTING); conDriver.btn_South - .whileTrue(ejectingHopper); + .whileTrue(TRY_EJECTING_HOPPER); conDriver.btn_East - .whileTrue(reversingShooter); + .whileTrue(TRY_REVERSING_SHOOTER); conDriver.btn_West - .onTrue(prepNeautralToAlliance); + .onTrue(TRY_PREPNEAUTRALTOALLIANCE); conDriver.btn_RightTrigger - .whileTrue(shooting); + .whileTrue(TRY_SHOOTING); conDriver.btn_A - .onTrue(prepTrench); + .onTrue(TRY_PREPTRENCH); conDriver.btn_B - .onTrue(prepCorner); + .onTrue(TRY_PREPCORNER); conDriver.btn_X - .onTrue(prepTower); + .onTrue(TRY_PREPTOWER); conDriver.btn_Y - .onTrue(prepHub); + .onTrue(TRY_PREPHUB); conDriver.btn_RightBumper - .onTrue(prepAnywhere); + .onTrue(TRY_PREPANYWHERE); // Example Pose Drive // conDriver.btn_X From 4e7ea0a4043623a048192dfaced61655b4381ff5 Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 30 May 2026 20:39:12 -0700 Subject: [PATCH 4/5] mapping buttons Co-Authored-By: jayden mendoza <244560677+jaymendo670-png@users.noreply.github.com> --- src/main/java/frc/robot/RobotContainer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 6df21c3..d70a523 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -145,7 +145,7 @@ public RobotContainer() { private void configDriverBindings() { conDriver.btn_LeftTrigger .whileTrue(TRY_INTAKING); - conDriver.btn_RightBumper + conDriver.btn_RightStick .onTrue(TRY_RETRACTING); conDriver.btn_South .whileTrue(TRY_EJECTING_HOPPER); @@ -153,6 +153,8 @@ private void configDriverBindings() { .whileTrue(TRY_REVERSING_SHOOTER); conDriver.btn_West .onTrue(TRY_PREPNEAUTRALTOALLIANCE); + conDriver.btn_LeftStick + .onTrue(TRY_PREPOPPONENTOALLIANCE); conDriver.btn_RightTrigger .whileTrue(TRY_SHOOTING); conDriver.btn_A From 312208746ca57f17db2fff503d19e9677159772d Mon Sep 17 00:00:00 2001 From: FRCTeam3255-Shared <170778697+FRCTeam3255-Shared@users.noreply.github.com> Date: Sat, 30 May 2026 20:42:42 -0700 Subject: [PATCH 5/5] button map Co-Authored-By: jayden mendoza <244560677+jaymendo670-png@users.noreply.github.com> --- src/main/java/frc/robot/RobotContainer.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index d70a523..ed4a8d6 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -22,18 +22,6 @@ import frc.robot.DeviceIDs.controllerIDs; import frc.robot.commands.AddVisionMeasurement; import frc.robot.commands.ResetPose; -import frc.robot.commands.states.EjectingHopper; -import frc.robot.commands.states.Intaking; -import frc.robot.commands.states.PrepAnywhere; -import frc.robot.commands.states.PrepCorner; -import frc.robot.commands.states.PrepHub; -import frc.robot.commands.states.PrepNeautralToAlliance; -import frc.robot.commands.states.PrepOpponentToAlliance; -import frc.robot.commands.states.PrepTower; -import frc.robot.commands.states.PrepTrench; -import frc.robot.commands.states.RetractIntake; -import frc.robot.commands.states.ReversingShooter; -import frc.robot.commands.states.Shooting; import frc.robot.constants.ConstSystem; import frc.robot.constants.ConstSystem.constControllers; import frc.robot.subsystems.DriverStateMachine;