diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index ab16101..b48de4c 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -84,11 +84,15 @@ public class RobotContainer { NamedCommands.registerCommand("lancer", new LancerNote(lanceur, accumulateur)); NamedCommands.registerCommand("piston", new PistonFerme(grimpeur)); autoChooser = AutoBuilder.buildAutoChooser(); - + + //manette + manette.start().whileTrue(new RestGyro(drive)); manette.a().whileTrue(new GuiderBas(guideur)); manette.b().whileTrue(new GuiderHaut(guideur)); manette.x().whileTrue(new PistonFerme(grimpeur)); manette.y().whileTrue(new PistonOuvre(grimpeur)); + + //joystick joystick.button(3).whileTrue(new Balayer(balayeuse, accumulateur)); joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur)); joystick.button(5).whileTrue(new LancerAmp(lanceur, accumulateur)); @@ -96,7 +100,7 @@ public class RobotContainer { joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive))); joystick.button(6).whileTrue(new LancerTrape(lanceur, accumulateur)); joystick.button(7).whileTrue(new Limelight_tracker(limelight, drive)); - manette.start().whileTrue(new RestGyro(drive)); + // deplacement configureBindings(); drive.setDefaultCommand(new RunCommand(()->{ diff --git a/src/main/java/frc/robot/command/RestGyro.java b/src/main/java/frc/robot/command/RestGyro.java index 0c2c3fc..1da74be 100644 --- a/src/main/java/frc/robot/command/RestGyro.java +++ b/src/main/java/frc/robot/command/RestGyro.java @@ -18,13 +18,13 @@ public class RestGyro extends Command { // Called when the command is initially scheduled. @Override - public void initialize() {} + public void initialize() { + drive.restgyroscope(); + } // Called every time the scheduler runs while the command is scheduled. @Override - public void execute() { - drive.restgyroscope(); - } + public void execute() {} // Called once the command ends or is interrupted. @Override