This commit is contained in:
@ -4,14 +4,18 @@
|
||||
|
||||
package frc.robot.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.WaitCommand;
|
||||
import frc.robot.Subsystems.Accumulateur;
|
||||
import frc.robot.Subsystems.Lanceur;
|
||||
|
||||
public class Lancer extends Command {
|
||||
private Lanceur lanceur;
|
||||
private Accumulateur accumulateur;
|
||||
/** Creates a new Lancer. */
|
||||
public Lancer(Lanceur lanceur) {
|
||||
public Lancer(Lanceur lanceur,Accumulateur accumulateur) {
|
||||
this.lanceur = lanceur;
|
||||
addRequirements(lanceur);
|
||||
this.accumulateur = accumulateur;
|
||||
addRequirements(lanceur, accumulateur);
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
}
|
||||
// Called when the command is initially scheduled.
|
||||
@ -22,7 +26,10 @@ public class Lancer extends Command {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
lanceur.lance(0.5);
|
||||
lanceur.lance();
|
||||
accumulateur.desaccumule(0.2);
|
||||
|
||||
|
||||
}
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user