This commit is contained in:
Antoine PerreaultE
2023-11-06 19:40:13 -05:00
parent 79691234b4
commit ac2d2cf323
2 changed files with 9 additions and 5 deletions

View File

@@ -31,7 +31,12 @@ public class Force1 extends CommandBase {
double vitesse = SmartDashboard.getNumber("Force Lanceur", 100);
lanceur.lancer(200);
if (lanceur.vitesse() > vitesse ){
accumulateur.tourneavant();
if(accumulateur.tourneavant() < 1024){
accumulateur.Deaccumuler();
}
if(accumulateur.tournearriere()<-256){
accumulateur.reaccumuler();
}
accumulateur.tournearriere();
} else {
accumulateur.stop();