This commit is contained in:
Antoine PerreaultE 2024-02-27 18:05:13 -05:00
parent 40b23cf3f1
commit 36859ec3ad
2 changed files with 10 additions and 6 deletions

View File

@ -85,10 +85,14 @@ public class RobotContainer {
NamedCommands.registerCommand("piston", new PistonFerme(grimpeur)); NamedCommands.registerCommand("piston", new PistonFerme(grimpeur));
autoChooser = AutoBuilder.buildAutoChooser(); autoChooser = AutoBuilder.buildAutoChooser();
//manette
manette.start().whileTrue(new RestGyro(drive));
manette.a().whileTrue(new GuiderBas(guideur)); manette.a().whileTrue(new GuiderBas(guideur));
manette.b().whileTrue(new GuiderHaut(guideur)); manette.b().whileTrue(new GuiderHaut(guideur));
manette.x().whileTrue(new PistonFerme(grimpeur)); manette.x().whileTrue(new PistonFerme(grimpeur));
manette.y().whileTrue(new PistonOuvre(grimpeur)); manette.y().whileTrue(new PistonOuvre(grimpeur));
//joystick
joystick.button(3).whileTrue(new Balayer(balayeuse, accumulateur)); joystick.button(3).whileTrue(new Balayer(balayeuse, accumulateur));
joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur)); joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur));
joystick.button(5).whileTrue(new LancerAmp(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(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive)));
joystick.button(6).whileTrue(new LancerTrape(lanceur, accumulateur)); joystick.button(6).whileTrue(new LancerTrape(lanceur, accumulateur));
joystick.button(7).whileTrue(new Limelight_tracker(limelight, drive)); joystick.button(7).whileTrue(new Limelight_tracker(limelight, drive));
manette.start().whileTrue(new RestGyro(drive));
// deplacement // deplacement
configureBindings(); configureBindings();
drive.setDefaultCommand(new RunCommand(()->{ drive.setDefaultCommand(new RunCommand(()->{

View File

@ -18,13 +18,13 @@ public class RestGyro extends Command {
// Called when the command is initially scheduled. // Called when the command is initially scheduled.
@Override @Override
public void initialize() {} public void initialize() {
drive.restgyroscope();
}
// Called every time the scheduler runs while the command is scheduled. // Called every time the scheduler runs while the command is scheduled.
@Override @Override
public void execute() { public void execute() {}
drive.restgyroscope();
}
// Called once the command ends or is interrupted. // Called once the command ends or is interrupted.
@Override @Override