This commit is contained in:
samuel desharnais 2023-04-11 17:44:41 -04:00
parent 3b22a181cc
commit bded54b8c5
2 changed files with 7 additions and 7 deletions

View File

@ -110,8 +110,8 @@ public class RobotContainer {
private void configureBindings() { private void configureBindings() {
// manette 1 // manette 1
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
manette1.x().onTrue(brakeOuvre); manette2.a().onTrue(brakeOuvre);
manette1.b().onTrue(brakeFerme); manette2.b().onTrue(brakeFerme);
manette1.leftBumper().whileTrue(aprilTag); manette1.leftBumper().whileTrue(aprilTag);
manette1.rightBumper().whileTrue(tape); manette1.rightBumper().whileTrue(tape);
manette1.povUp().whileTrue(creerCommandBras(51, -37)); manette1.povUp().whileTrue(creerCommandBras(51, -37));
@ -126,8 +126,8 @@ public class RobotContainer {
manette2.leftBumper().whileTrue(cone); manette2.leftBumper().whileTrue(cone);
manette2.y().whileTrue(gyro); manette2.y().whileTrue(gyro);
manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro)); manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro));
manette2.a().whileTrue(gratteMonte); manette1.b().whileTrue(gratteMonte);
manette2.b().whileTrue(gratteBaisser); manette1.x().whileTrue(gratteBaisser);
} }
private Command creerCommandBras(double distancePivot, double distanceBras) { private Command creerCommandBras(double distancePivot, double distanceBras) {

View File

@ -28,11 +28,11 @@ public class Bougerbras extends CommandBase {
@Override @Override
public void execute() { public void execute() {
if(brasTelescopique.distance()>distance+0.5 ) { if(brasTelescopique.distance()>distance+0.5 ) {
brasTelescopique.AvanceRecule(-0.3); brasTelescopique.AvanceRecule(-0.35);
} }
else if(brasTelescopique.distance()<distance-0.5) { else if(brasTelescopique.distance()<distance-0.5) {
brasTelescopique.AvanceRecule(0.3); brasTelescopique.AvanceRecule(0.35);
} }
else { else {
brasTelescopique.AvanceRecule(0); brasTelescopique.AvanceRecule(0);