Skip to content

Commit

Permalink
SpinIntakeFlywheel command
Browse files Browse the repository at this point in the history
  • Loading branch information
AceiusRedshift committed Mar 2, 2024
1 parent 4e68f77 commit 0c289d3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/main/java/frc/robot/commands/SpinIntakeFlywheels.java
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
}
}

0 comments on commit 0c289d3

Please sign in to comment.