bougie fini(J'espere)
This commit is contained in:
@ -5,16 +5,19 @@
|
||||
package frc.robot.commands.requin;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import frc.robot.subsystems.Bougie;
|
||||
import frc.robot.subsystems.Requin;
|
||||
|
||||
/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
|
||||
public class aspire extends Command {
|
||||
/** Creates a new aspire. */
|
||||
private Requin requin;
|
||||
public aspire(Requin requin) {
|
||||
private Bougie bougie;
|
||||
public aspire(Requin requin, Bougie bougie) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
this.requin = requin;
|
||||
addRequirements(requin);
|
||||
this.bougie = bougie;
|
||||
addRequirements(requin, bougie);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@ -24,7 +27,14 @@ public class aspire extends Command {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
requin.balaye(0.3);
|
||||
if(requin.amp()> 60){
|
||||
requin.balaye(0);
|
||||
bougie.Vert();
|
||||
}
|
||||
else
|
||||
{
|
||||
requin.balaye(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
Reference in New Issue
Block a user