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