generated from StuyPulse/Phil
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into auton-redirection
- Loading branch information
Showing
33 changed files
with
574 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/stuypulse/robot/commands/intake/IntakeShoot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.stuypulse.robot.commands.intake; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
import com.stuypulse.robot.subsystems.intake.Intake; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import edu.wpi.first.wpilibj2.command.WaitCommand; | ||
|
||
public class IntakeShoot extends SequentialCommandGroup { | ||
|
||
public IntakeShoot() { | ||
addCommands( | ||
new InstantCommand(() -> Intake.getInstance().setState(Intake.State.SHOOTING), Intake.getInstance()), | ||
new WaitCommand(Settings.Intake.INTAKE_SHOOT_TIME), | ||
new IntakeStop() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/stuypulse/robot/commands/shooter/ShooterManualIntake.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.stuypulse.robot.commands.shooter; | ||
|
||
import com.stuypulse.robot.subsystems.shooter.Shooter; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
|
||
public class ShooterManualIntake extends Command{ | ||
|
||
private final Shooter shooter; | ||
|
||
public ShooterManualIntake() { | ||
shooter = Shooter.getInstance(); | ||
addRequirements(shooter); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
shooter.setFeederState(Shooter.FeederState.INTAKING); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return shooter.hasNote(); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
shooter.setFeederState(Shooter.FeederState.STOP); | ||
} | ||
} |
Oops, something went wrong.