diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 24fa703..4e80b9f 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -64,7 +64,7 @@ public class RobotContainer { GenericEntry reculerdistances = layoutauto.addPersistent("reculerdistancesortir", -66).getEntry(); GenericEntry reculerdistanceb = layoutauto.addPersistent("reculerdistancebalance", -31).getEntry(); GenericEntry avancerdistance = layoutauto.addPersistent("avancer", 35).getEntry(); - + // subsystems BasePilotable basePilotable = new BasePilotable(); Gratte gratte = new Gratte(); @@ -110,8 +110,8 @@ public class RobotContainer { private void configureBindings() { // manette 1 manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); - manette1.x().onTrue(brakeOuvre); - manette1.b().onTrue(brakeFerme); + manette2.a().onTrue(brakeOuvre); + manette2.b().onTrue(brakeFerme); manette1.leftBumper().whileTrue(aprilTag); manette1.rightBumper().whileTrue(tape); manette1.povUp().whileTrue(creerCommandBras(51, -37)); @@ -126,8 +126,8 @@ public class RobotContainer { manette2.leftBumper().whileTrue(cone); manette2.y().whileTrue(gyro); manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro)); - manette2.a().whileTrue(gratteMonte); - manette2.b().whileTrue(gratteBaisser); + manette1.b().whileTrue(gratteMonte); + manette1.x().whileTrue(gratteBaisser); } private Command creerCommandBras(double distancePivot, double distanceBras) { diff --git a/src/main/java/frc/robot/commands/bras/Bougerbras.java b/src/main/java/frc/robot/commands/bras/Bougerbras.java index 6390c94..d807832 100644 --- a/src/main/java/frc/robot/commands/bras/Bougerbras.java +++ b/src/main/java/frc/robot/commands/bras/Bougerbras.java @@ -28,11 +28,11 @@ public class Bougerbras extends CommandBase { @Override public void execute() { if(brasTelescopique.distance()>distance+0.5 ) { - brasTelescopique.AvanceRecule(-0.3); + brasTelescopique.AvanceRecule(-0.35); } else if(brasTelescopique.distance()