-
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
1 parent
4e68f77
commit 0c289d3
Showing
1 changed file
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package frc.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.intake.IntakeShooter; | ||
|
||
public class SpinIntakeFlywheels extends Command { | ||
private IntakeShooter intakeShooter; | ||
private int speed; | ||
|
||
private long startTime; | ||
|
||
public SpinIntakeFlywheels(IntakeShooter intake, int speed) { | ||
intakeShooter = intake; | ||
this.speed = speed; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
startTime = System.currentTimeMillis(); | ||
intakeShooter.setFlyWheelSpeed(speed); | ||
} | ||
|
||
// @Override | ||
// public void execute() { } | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return (System.currentTimeMillis() + 1000) >= startTime; | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
// end | ||
} | ||
} |