This commit is contained in:
parent
5bdfbf1297
commit
faa906d6b7
@ -30,16 +30,6 @@ public class GrimpeurDroit extends Command {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
grimpeur.droit(doubleSupplier.getAsDouble());
|
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.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -31,21 +31,6 @@ public class GrimpeurGauche extends Command {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
grimpeur.gauche(doubleSupplier.getAsDouble());
|
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.
|
// Called once the command ends or is interrupted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user