From 13a277b0b43938a48bfcf284544a33281db72539 Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 10:13:04 -0800 Subject: [PATCH 1/5] Started --- .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index d7f18df..0b72a75 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -69,6 +69,10 @@ private void stopIntaking() { io.stopRoller(); } + private void eject(){ + io.setRollerVoltage() + } + /** * Stows the intake and hopper. */ From 5196d02e3ea262aeb6b49d004c7f3b0cc5d6283f Mon Sep 17 00:00:00 2001 From: Adam Mahmoud Date: Sat, 14 Feb 2026 10:17:01 -0800 Subject: [PATCH 2/5] Made Eject Command --- .../java/frc/robot/subsystems/intake/IntakeConstants.java | 1 + .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java b/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java index f2d74d3..8f639b1 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeConstants.java @@ -52,6 +52,7 @@ public final class IntakeConstants { public static final AngularVelocity rollerMaxVelocity= DegreesPerSecond.of(360); //Temporary speed to be changed as needed public static final Voltage rollerCollectVoltage= Volts.of(6); //Temporary voltage + public static final Voltage rollerEjectVoltage= Volts.of(-6); //Temporary voltage public static final Angle pivotTolerance = Degrees.of(5); //Tolerance to compare current angle to target diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 0b72a75..4b675b3 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -70,7 +70,7 @@ private void stopIntaking() { } private void eject(){ - io.setRollerVoltage() + io.setRollerVoltage(IntakeConstants.rollerEjectVoltage); } /** @@ -154,6 +154,12 @@ public Command intakeSequence() { ).finallyDo(interrupted -> waiting()); } + public Command ejectSequence() { + return runOnce(this::eject).beforeStarting( + deployCmd().unless(this::isIntakeDeployed) + ).finallyDo(interrupted -> waiting()); + } + //////////////////////////// /// Sys ID Routine creation/ /// //////////////////////// From 55f7c385d35c0203efd7f666b7f04ca5dc341dee Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 10:21:59 -0800 Subject: [PATCH 3/5] Gamepad binding to eject intake sequence --- src/main/java/frc/robot/RobotContainer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index c1e16f7..3738558 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -326,6 +326,9 @@ private void configureBindings() { // When the shooter isnt shooting, get it ready to shoot. shooter_.setDefaultCommand(shooter_.awaitShooting(drivebase_::getPose)); + + //While the A button is held, the intake will run the eject sequence. If it the intake is stowed, it will also deploy it. + gamepad_.a().whileTrue(intake_.ejectSequence()); } private void configureDriveBindings() { From d3013b9db3df25e9ede50e260bcbb2797ba744e2 Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 10:35:09 -0800 Subject: [PATCH 4/5] Finished eject command --- src/main/java/frc/robot/Constants.java | 2 +- .../java/frc/robot/subsystems/intake/IntakeSubsystem.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index a763ab7..dfa034a 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -36,7 +36,7 @@ public final class Constants { // Sets the currently running robot. Change to SIMBOT when running the // desktop physics simulation so AdvantageKit runs in SIM mode instead of // falling back to REPLAY. - private static final RobotType robotType = RobotType.COMPETITION; + private static final RobotType robotType = RobotType.SIMBOT; public static final boolean spawnLessFuelInSim = true; diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 4b675b3..2b3099c 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -154,8 +154,12 @@ public Command intakeSequence() { ).finallyDo(interrupted -> waiting()); } + public Command runEjectCmd() { + return startEnd(this::eject, this::stopIntaking); + } + public Command ejectSequence() { - return runOnce(this::eject).beforeStarting( + return runEjectCmd().beforeStarting( deployCmd().unless(this::isIntakeDeployed) ).finallyDo(interrupted -> waiting()); } From 98f2a3b4f1b7853f2d4fa2673efb18f4893f792d Mon Sep 17 00:00:00 2001 From: singhsharmadev-png Date: Sat, 14 Feb 2026 11:50:35 -0800 Subject: [PATCH 5/5] Done --- src/main/java/frc/robot/Constants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index dfa034a..a763ab7 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -36,7 +36,7 @@ public final class Constants { // Sets the currently running robot. Change to SIMBOT when running the // desktop physics simulation so AdvantageKit runs in SIM mode instead of // falling back to REPLAY. - private static final RobotType robotType = RobotType.SIMBOT; + private static final RobotType robotType = RobotType.COMPETITION; public static final boolean spawnLessFuelInSim = true;