Skip to content

Commit

Permalink
flush command
Browse files Browse the repository at this point in the history
Signed-off-by: KP <86213869+Kanishk-Pandey@users.noreply.github.com>
  • Loading branch information
GBKP committed Feb 29, 2024
1 parent b80b38e commit 357aec2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private void configureButtonBindings() {
operatorController
.povDown()
.whileTrue(
IntakeCommands.flushIntake(intake)
IntakeCommands.flushIntake(intake).alongWith(FeederCommands.flushFeeder(feeder))
);


Expand Down
10 changes: 10 additions & 0 deletions src/main/java/frc/robot/commands/FeederCommands.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package frc.robot.commands;

import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.RunCommand;
import frc.robot.subsystems.feeder.Feeder;

import static edu.wpi.first.wpilibj2.command.Commands.run;
Expand All @@ -17,6 +19,14 @@ public static Command feedToShooter(Feeder feeder) {
);
}

public static Command flushFeeder(Feeder feeder){
return new RunCommand(
() -> {
feeder.runVolts(-0.75);
},
feeder);
}

public static Command feedToBeamBreak(Feeder feeder) {
return sequence(
run(() -> feeder.runVolts(8), feeder)
Expand Down

0 comments on commit 357aec2

Please sign in to comment.