This commit is contained in:
Antoine PerreaultE 2023-03-20 19:15:34 -04:00
parent dd3211b6ea
commit 1da49837db

View File

@ -109,7 +109,6 @@ public class RobotContainer {
private void configureBindings() {
// manette 1
//y lumiere limelight, manuel 2e joystik,
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
manette1.x().onTrue(brakeOuvre);
manette1.b().onTrue(brakeFerme);
@ -152,12 +151,11 @@ public class RobotContainer {
Map.entry(nulpart, creerCommandBras(0, 0))), chooser::getSelected),
new OuvrePince(pince).unless(() -> chooser.getSelected().equals(nulpart)),
Commands.waitSeconds(1),
fermePince.unless(() -> chooser.getSelected().equals(nulpart)),
new FermePince(pince).unless(() -> chooser.getSelected().equals(nulpart)),
creerCommandBras(0, 0).unless(() -> chooser.getSelected().equals(nulpart)),
Commands.waitSeconds(1),
Commands.either(reculers, reculerb, () -> autosortir.getBoolean(true)),
new Avancer(basePilotable, () -> avancerdistance.getDouble(0))
.unless(() -> !autosortir.getBoolean(true) || !autobalance.getBoolean(false)),
new Avancer(basePilotable, () -> avancerdistance.getDouble(0)).unless(() -> !autosortir.getBoolean(true) || !autobalance.getBoolean(false)),
Commands.either(gyro, Commands.none(), () -> autobalance.getBoolean(true))))
.andThen(brakeOuvre);