This commit is contained in:
Antoine PerreaultE 2023-03-20 18:04:30 -04:00
parent 06bd854326
commit 0e72ebe049

View File

@ -146,13 +146,13 @@ public RobotContainer() {
Map.entry(enbas,pivoteBrasBas),
Map.entry(nulpart,pivotBrasRentre)
), chooser::getSelected),
ouvrePince.unless(()->chooser.getSelected().equals(nulpart)),
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)),
new PivotBrasRentre(brasTelescopique , pivot).unless(()->chooser.getSelected().equals(nulpart)),
Commands.waitSeconds(1),
Commands.either(reculers, reculerb,()-> autosortir.getBoolean(true)),
avancer.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(new InstantCommand(basePilotable::BrakeOuvre,basePilotable));