-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
101 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package frc.robot.auto; | ||
|
||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||
import frc.robot.elevator.Elevator; | ||
import frc.robot.elevator.commands.ElevatorDown; | ||
import frc.robot.elevator.commands.ElevatorUp; | ||
import frc.robot.intake.Intake; | ||
import frc.robot.intake.commands.IntakeAmpScore; | ||
|
||
public class AmpScore extends SequentialCommandGroup { | ||
public AmpScore(Elevator elevator, Intake intake) { | ||
addCommands( | ||
new ElevatorUp(elevator), | ||
new IntakeAmpScore(intake), | ||
new ElevatorDown(elevator) | ||
); | ||
} | ||
} |
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 frc.robot.auto; | ||
|
||
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; | ||
import frc.robot.intake.Intake; | ||
|
||
import frc.robot.intake.commands.IntakeShooterFeed; | ||
import frc.robot.shooter.Shooter; | ||
import frc.robot.shooter.commands.ActivateShooter; | ||
|
||
public class ShootNote extends ParallelCommandGroup { | ||
public ShootNote(Shooter shooter, Intake intake) { | ||
addCommands( | ||
new ActivateShooter(shooter), | ||
|
||
new IntakeShooterFeed(intake) | ||
|
||
); | ||
} | ||
} |
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
36 changes: 36 additions & 0 deletions
36
src/main/java/frc/robot/shooter/commands/ActivateShooter.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,36 @@ | ||
package frc.robot.shooter.commands; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.constants.ShooterConstants; | ||
import frc.robot.shooter.Shooter; | ||
|
||
public class ActivateShooter extends Command { | ||
private final Shooter shooter; | ||
private double startTime; | ||
|
||
public ActivateShooter(Shooter shooter) { | ||
this.shooter = shooter; | ||
addRequirements(shooter); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
startTime = Timer.getFPGATimestamp(); | ||
shooter.shooterRun(); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
shooter.shooterOff(); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return Timer.getFPGATimestamp() - startTime > ShooterConstants.DELAY; | ||
} | ||
} |
36 changes: 0 additions & 36 deletions
36
src/main/java/frc/robot/shooter/commands/ShooterCommand.java
This file was deleted.
Oops, something went wrong.