This commit is contained in:
samuel desharnais 2023-03-20 18:09:28 -04:00
commit 18e7c292ce

View File

@ -145,9 +145,13 @@ public RobotContainer() {
Map.entry(enbas,pivoteBrasBas), Map.entry(enbas,pivoteBrasBas),
Map.entry(nulpart,pivotBrasRentre) Map.entry(nulpart,pivotBrasRentre)
), chooser::getSelected), ), chooser::getSelected),
ouvrePince.unless(()->chooser.getSelected().equals(nulpart)), new OuvrePince(pince).unless(()->chooser.getSelected().equals(nulpart)),
Commands.waitSeconds(1),
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)), 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)) Commands.either(gyro, Commands.none(),()-> autobalance.getBoolean(true))
).deadlineWith(Commands.waitSeconds(14.6)).andThen(brakeOuvre); ).deadlineWith(Commands.waitSeconds(14.6)).andThen(brakeOuvre);