jgfhfcnh
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package frc.robot.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc.robot.subsystems.Gratte;
|
||||
|
||||
|
||||
public class GratteBaisser extends CommandBase {
|
||||
private Gratte gratte;
|
||||
/** Creates a new GratteBaisser. */
|
||||
@ -23,7 +23,20 @@ public class GratteBaisser extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
gratte.baiser(0.5);
|
||||
if(gratte.basd()){
|
||||
gratte.baiser(0);
|
||||
}
|
||||
else{
|
||||
gratte.baiser(0.5);
|
||||
}
|
||||
if(gratte.basg()){
|
||||
gratte.baiser(0);
|
||||
}
|
||||
else{
|
||||
gratte.baiser(0.5);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -23,7 +23,18 @@ public class GratteMonte extends CommandBase {
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {
|
||||
gratte.Lever(0.5);
|
||||
if(gratte.hautd()){
|
||||
gratte.Lever(0);
|
||||
}
|
||||
else{
|
||||
gratte.Lever(0.5);
|
||||
}
|
||||
if(gratte.hautg()) {
|
||||
gratte.Lever(0.5);
|
||||
}
|
||||
else{
|
||||
gratte.Lever(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -33,6 +33,9 @@ public class PivotBrasRentre extends CommandBase {
|
||||
if (pivot.distance()>1){
|
||||
pivot.monteDescendre(0.5);
|
||||
}
|
||||
else if(brasTelescopique.photocell()){
|
||||
brasTelescopique.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
Reference in New Issue
Block a user