d
This commit is contained in:
parent
852aef392e
commit
507e488c6a
@ -30,10 +30,7 @@ public class GrimpeurDroit extends Command {
|
||||
@Override
|
||||
public void execute() {
|
||||
grimpeur.droit(doubleSupplier.getAsDouble());
|
||||
if(grimpeur.encoderd()<73){
|
||||
grimpeur.droit(doubleSupplier.getAsDouble());
|
||||
}
|
||||
else if(grimpeur.getpitch()<-15){
|
||||
if(grimpeur.getpitch()<-15){
|
||||
grimpeur.droit(-doubleSupplier.getAsDouble());
|
||||
|
||||
}
|
||||
@ -43,11 +40,6 @@ public class GrimpeurDroit extends Command {
|
||||
else{
|
||||
grimpeur.droit(0);
|
||||
}
|
||||
if(grimpeur.encoderd()>0){
|
||||
grimpeur.resetencodeurd();
|
||||
grimpeur.droit(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
@ -31,10 +31,7 @@ public class GrimpeurGauche extends Command {
|
||||
@Override
|
||||
public void execute() {
|
||||
grimpeur.gauche(doubleSupplier.getAsDouble());
|
||||
if(grimpeur.encoderg()<78){
|
||||
grimpeur.gauche(doubleSupplier.getAsDouble());
|
||||
}
|
||||
else if(grimpeur.getpitch()<-15){
|
||||
if(grimpeur.getpitch()<-15){
|
||||
grimpeur.gauche(doubleSupplier.getAsDouble());
|
||||
}
|
||||
else if(grimpeur.getpitch()>15){
|
||||
@ -46,10 +43,9 @@ public class GrimpeurGauche extends Command {
|
||||
if(grimpeur.encoderg()<0){
|
||||
grimpeur.gauche(doubleSupplier.getAsDouble());
|
||||
}
|
||||
else{
|
||||
grimpeur.resetencodeurg();
|
||||
grimpeur.gauche(0);
|
||||
}
|
||||
else{
|
||||
grimpeur.gauche(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
|
Loading…
x
Reference in New Issue
Block a user