diff --git a/src/main/java/frc/robot/commands/BoutonA.java b/src/main/java/frc/robot/commands/BoutonA.java index 347895d..d60967e 100644 --- a/src/main/java/frc/robot/commands/BoutonA.java +++ b/src/main/java/frc/robot/commands/BoutonA.java @@ -5,6 +5,7 @@ package frc.robot.commands; import edu.wpi.first.wpilibj2.command.CommandBase; +import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import frc.robot.subsystems.Poussoir; import frc.robot.subsystems.Pistonshaker; @@ -22,8 +23,10 @@ public class BoutonA extends CommandBase { // Called when the command is initially scheduled. @Override public void initialize() { - poussoir.pousser(); - pistonshaker.rentrerpiston(); + new SequentialCommandGroup ( +new Activer_poussoir(poussoir).withTimeout(2), +new Activershaker(pistonshaker)); + } // Called every time the scheduler runs while the command is scheduled.