diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 38fcbe5..5eb7222 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -117,7 +117,8 @@ public RobotContainer() { private void configureBindings() { // manette 1 manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); - manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); + manette1.x().onTrue(brakeOuvre); + manette1.b().onTrue(brakeFerme); manette1.leftBumper().toggleOnTrue(aprilTag); manette1.rightBumper().toggleOnTrue(tape); manette1.povUp().whileTrue(pivoteBrasHaut); @@ -155,7 +156,7 @@ public RobotContainer() { Commands.either(reculers, reculerb,()-> autosortir.getBoolean(true)), avancer.unless(()->!autosortir.getBoolean(true)|| !autobalance.getBoolean(false)), Commands.either(gyro, Commands.none(),()-> autobalance.getBoolean(true)) - )).andThen(brakeOuvre); + )).andThen(new InstantCommand(basePilotable::BrakeOuvre)); } diff --git a/src/main/java/frc/robot/commands/bras/PivoteBrasMilieux.java b/src/main/java/frc/robot/commands/bras/PivoteBrasMilieux.java index 764050b..8d80105 100644 --- a/src/main/java/frc/robot/commands/bras/PivoteBrasMilieux.java +++ b/src/main/java/frc/robot/commands/bras/PivoteBrasMilieux.java @@ -41,10 +41,10 @@ public class PivoteBrasMilieux extends CommandBase { brasTelescopique.ouvrir(); } if (pivot.distance()<43.5){ - pivot.monteDescendre(0.6); + pivot.monteDescendre(0.7); } else if(pivot.distance()>44.5) { - pivot.monteDescendre(-0.6); + pivot.monteDescendre(-0.7); } else{ pivot.monteDescendre(0);