This commit is contained in:
samuel desharnais
2023-12-02 09:30:18 -05:00
parent c26a26c577
commit 0e444784fc
2 changed files with 45 additions and 5 deletions

View File

@ -37,11 +37,15 @@ public class Force1 extends CommandBase {
double vitesse = (100);
if (lanceur.vitesse() > vitesse ){
accumulateur.tourneavant();
accumulateur.tournearriere();
} else {
accumulateur.stop();
if(accumulateur.tourneavant()>1024) {
accumulateur.tournearriere();
}
}
if(accumulateur.tournearriere()>-256){
accumulateur.stop();
}
}}
// Called once the command ends or is interrupted.
@ -53,6 +57,6 @@ public class Force1 extends CommandBase {
// Returns true when the command should end.
@Override
public boolean isFinished() {
return false;
return accumulateur.tournearriere()>-256;
}
}