pince et elevateur
This commit is contained in:
parent
c81f118058
commit
eece0f47fa
@ -10,8 +10,10 @@ import frc.robot.subsystems.Elevateur;
|
|||||||
/* 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 */
|
/* 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 Depart extends Command {
|
public class Depart extends Command {
|
||||||
private Elevateur elevateur;
|
private Elevateur elevateur;
|
||||||
|
private Pince pince;
|
||||||
/** Creates a new L2. */
|
/** Creates a new L2. */
|
||||||
public Depart(Elevateur elevateur) {
|
public Depart(Elevateur elevateur) {
|
||||||
|
|
||||||
this.elevateur = elevateur;
|
this.elevateur = elevateur;
|
||||||
addRequirements(elevateur);
|
addRequirements(elevateur);
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
@ -31,6 +33,13 @@ public class Depart extends Command {
|
|||||||
else{
|
else{
|
||||||
elevateur.vitesse(-.5);
|
elevateur.vitesse(-.5);
|
||||||
}
|
}
|
||||||
|
if(pince.position()==true){
|
||||||
|
pince.pivote(0);
|
||||||
|
pince.reset();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
pince.pivote(.5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user