diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 0d1ff2d..52c4dfc 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -9,6 +9,7 @@ import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj.XboxController.Button; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; @@ -20,17 +21,14 @@ import frc.robot.subsystems.Pistonshaker; // commands import frc.robot.commands.Activer_poussoir; import frc.robot.commands.ActiverBlockeur; -<<<<<<< HEAD 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.Avancer; -======= import frc.robot.commands.Activershaker; import frc.robot.commands.DesactiverBlockeur; ->>>>>>> 3d2fed7d28e2c16a03399281bc03d1cf3df4f6d1 @@ -90,17 +88,19 @@ public class RobotContainer { public Command getAutonomousCommand() { // An ExampleCommand will run in autonomous 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) - ); + new Reculer(basePilotable).withTimeout(SmartDashboard.getNumber("temps reculer", 1)), + new TournerGauche(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne gauche1",1)), + new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avencer1",1)), + new TournerDroite(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne droite1",1)), + new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avancer2",1)), + new TournerGauche(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne gauche2",1)), + new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avancer3",1)), + new TournerDroite(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne droite 2",1)), + new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avancer4",1)), + new DesactiverBlockeur(poussoir).withTimeout(SmartDashboard.getNumber("temps du b1",0.8)), + new Activer_poussoir(poussoir).withTimeout(SmartDashboard.getNumber("temps pousser1",1)), + new Activershaker(pistonshaker).withTimeout(SmartDashboard.getNumber("temps du b2",1)), + new Activer_poussoir(poussoir).withTimeout(SmartDashboard.getNumber("temps pousser2",1))); + } }