diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index a98cfec..4a68b42 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,20 +6,15 @@ package frc.robot; import com.pathplanner.lib.auto.AutoBuilder; import com.pathplanner.lib.auto.NamedCommands; -import com.pathplanner.lib.commands.PathPlannerAuto; - import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.math.MathUtil; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import edu.wpi.first.wpilibj2.command.RunCommand; -import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; -// Manette -import edu.wpi.first.wpilibj2.command.WaitCommand; + // Manettes import edu.wpi.first.wpilibj2.command.button.CommandJoystick; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; @@ -37,6 +32,7 @@ import frc.robot.command.Lancerampli; import frc.robot.command.Limelight_tracker; import frc.robot.command.PistonFerme; import frc.robot.command.Pistongrimpeur; + // Subsystems import frc.robot.subsystem.Accumulateur; import frc.robot.subsystem.Balayeuse; @@ -46,7 +42,6 @@ import frc.robot.subsystem.Guideur; import frc.robot.subsystem.LED; import frc.robot.subsystem.Lanceur; import frc.robot.subsystem.Limelight; -import frc.robot.subsystem.Pixy; public class RobotContainer { @@ -60,9 +55,9 @@ public class RobotContainer { Lanceur lanceur = new Lanceur(); Limelight limelight = new Limelight(); LED LED = new LED(); - Pixy pixy = new Pixy(); CommandJoystick joystick = new CommandJoystick(0); CommandXboxController manette = new CommandXboxController(1); + //command PistonFerme pistonFerme = new PistonFerme(grimpeur); Balayer balayer = new Balayer(balayeuse, accumulateur); @@ -88,10 +83,14 @@ public class RobotContainer { joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur)); joystick.button(4).whileTrue(new ParallelCommandGroup(new Lancer(lanceur,limelight),new Limelight_tracker(limelight,drive))); joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive),new GuiderHaut(guideur))); + + // deplacement configureBindings(); drive.setDefaultCommand(new RunCommand(()->{ drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2)); },drive)); + + // grimpeur manuel grimpeur.setDefaultCommand(new RunCommand(()->{ grimpeur.droit(manette.getLeftX()); grimpeur.gauche(manette.getRightX());} @@ -103,12 +102,9 @@ public class RobotContainer { .withPosition(1,1); } - private void configureBindings() { - - } + private void configureBindings() {} public Command getAutonomousCommand(){ - return autoChooser.getSelected(); - + return autoChooser.getSelected(); } }