robot-2024/src/main/java/frc/robot/command/Lancerampli.java

46 lines
1.1 KiB
Java
Raw Normal View History

2024-01-30 19:52:21 -05:00
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot.command;
2024-02-01 18:09:36 -05:00
2024-01-30 19:52:21 -05:00
import edu.wpi.first.wpilibj2.command.Command;
2024-02-01 18:09:36 -05:00
2024-01-30 19:52:21 -05:00
import frc.robot.subsystem.Lanceur;
public class Lancerampli extends Command {
/** Creates a new Lanceur. */
2024-02-01 17:27:42 -05:00
private Lanceur lanceur;
2024-02-01 19:20:32 -05:00
public Lancerampli(Lanceur lanceur) {
2024-01-30 19:52:21 -05:00
// Use addRequirements() here to declare subsystem dependencies.
2024-02-01 17:27:42 -05:00
addRequirements(lanceur);
this.lanceur = lanceur;
2024-01-30 19:52:21 -05:00
}
// Called when the command is initially scheduled.
@Override
public void initialize() {}
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
2024-02-05 19:15:56 -05:00
lanceur.lanceramp();
2024-01-30 19:52:21 -05:00
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
2024-02-01 17:27:42 -05:00
lanceur.lancer(0);
2024-01-30 19:52:21 -05:00
}
// Returns true when the command should end.
@Override
public boolean isFinished() {
return false;
}
}