Bougie(pas fini)
This commit is contained in:
@ -6,14 +6,16 @@ package frc.robot.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import frc.robot.subsystems.Pince;
|
||||
|
||||
import frc.robot.subsystems.Bougie;
|
||||
/* 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 CoralExpire extends Command {
|
||||
private Pince pince;
|
||||
Bougie bougie;
|
||||
/** Creates a new CoralAlgue. */
|
||||
public CoralExpire(Pince pince) {
|
||||
public CoralExpire(Pince pince, Bougie bougie) {
|
||||
this.pince = pince;
|
||||
addRequirements(pince);
|
||||
this.bougie = bougie;
|
||||
addRequirements(pince,bougie);
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
}
|
||||
|
||||
@ -24,7 +26,12 @@ public class CoralExpire extends Command {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
if(pince.emperagecoral() > 8){
|
||||
pince.aspirecoral(-.5);
|
||||
}
|
||||
else{
|
||||
pince.aspirecoral(-.5);
|
||||
bougie.Rouge();}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -6,14 +6,16 @@ package frc.robot.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import frc.robot.subsystems.Pince;
|
||||
|
||||
import frc.robot.subsystems.Bougie;
|
||||
/* 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 CoralInspire extends Command {
|
||||
private Pince pince;
|
||||
Bougie bougie;
|
||||
/** Creates a new CoralAlgue. */
|
||||
public CoralInspire(Pince pince) {
|
||||
public CoralInspire(Pince pince, Bougie bougie) {
|
||||
this.pince = pince;
|
||||
addRequirements(pince);
|
||||
this.bougie = bougie;
|
||||
addRequirements(pince,bougie);
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
}
|
||||
|
||||
@ -25,6 +27,7 @@ public class CoralInspire extends Command {
|
||||
@Override
|
||||
public void execute() {
|
||||
if(pince.emperagecoral()>8){
|
||||
bougie.Vert();
|
||||
pince.aspirecoral(0);
|
||||
}
|
||||
else{
|
||||
|
Reference in New Issue
Block a user