This commit is contained in:
samuel desharnais 2024-02-24 13:36:13 -05:00
parent 5bdfbf1297
commit faa906d6b7
2 changed files with 0 additions and 25 deletions

View File

@ -30,16 +30,6 @@ public class GrimpeurDroit extends Command {
@Override
public void execute() {
grimpeur.droit(doubleSupplier.getAsDouble());
if(grimpeur.getpitch()<-15){
grimpeur.droit(-doubleSupplier.getAsDouble());
}
else if(grimpeur.getpitch()>15){
grimpeur.droit(doubleSupplier.getAsDouble());
}
else{
grimpeur.droit(0);
}
}
// Called once the command ends or is interrupted.

View File

@ -31,21 +31,6 @@ public class GrimpeurGauche extends Command {
@Override
public void execute() {
grimpeur.gauche(doubleSupplier.getAsDouble());
if(grimpeur.getpitch()<-15){
grimpeur.gauche(doubleSupplier.getAsDouble());
}
else if(grimpeur.getpitch()>15){
grimpeur.gauche(-doubleSupplier.getAsDouble());
}
else{
grimpeur.gauche(0);
}
if(grimpeur.encoderg()<0){
grimpeur.gauche(doubleSupplier.getAsDouble());
}
else{
grimpeur.gauche(0);
}
}
// Called once the command ends or is interrupted.