bougie fini(J'espere)
This commit is contained in:
@ -5,16 +5,21 @@
|
||||
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 exspire extends Command {
|
||||
/** Creates a new aspire. */
|
||||
private Requin requin;
|
||||
public exspire(Requin requin) {
|
||||
private Bougie bougie
|
||||
;
|
||||
public exspire(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 +29,14 @@ public class exspire 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.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
bougie.Rouge();
|
||||
requin.balaye(-0.5);
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
Reference in New Issue
Block a user