This commit is contained in:
samuel desharnais 2022-11-23 19:06:30 -05:00
parent 4c58e53150
commit 838120cd40

View File

@ -11,6 +11,7 @@ import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.RunCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.button.JoystickButton; import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import frc.robot.subsystems.BasePilotable; import frc.robot.subsystems.BasePilotable;
import frc.robot.subsystems.Poussoir; import frc.robot.subsystems.Poussoir;
@ -18,7 +19,11 @@ import frc.robot.subsystems.Pistonshaker;
import frc.robot.commands.Activer_poussoir; import frc.robot.commands.Activer_poussoir;
import frc.robot.commands.ActiverBlockeur; import frc.robot.commands.ActiverBlockeur;
import frc.robot.commands.DesactiverBlockeur; import frc.robot.commands.DesactiverBlockeur;
import frc.robot.commands.Reculer;
import frc.robot.commands.TournerDroite;
import frc.robot.commands.TournerGauche;
import frc.robot.commands.Activershaker; import frc.robot.commands.Activershaker;
import frc.robot.commands.Avancer;
/** /**
@ -65,6 +70,18 @@ public class RobotContainer {
*/ */
public Command getAutonomousCommand() { public Command getAutonomousCommand() {
// An ExampleCommand will run in autonomous // An ExampleCommand will run in autonomous
return null; return new SequentialCommandGroup(
new Reculer(basePilotable).withTimeout(0.5),
new TournerGauche(basePilotable).withTimeout(0.5),
new Avancer(basePilotable).withTimeout(0.5),
new TournerDroite(basePilotable).withTimeout(0.5),
new Avancer(basePilotable).withTimeout(0.5),
new TournerGauche(basePilotable).withTimeout(0.5),
new Avancer(basePilotable).withTimeout(0.5),
new TournerDroite(basePilotable).withTimeout(0.5),
new Avancer(basePilotable).withTimeout(0.5),
new Activer_poussoir(poussoir).withTimeout(0.3),
new Activershaker(pistonshaker)
);
} }
} }