This commit is contained in:
Antoine PerreaultE 2024-02-13 18:08:55 -05:00
parent 81679090d9
commit dcfd6b3a4e

View File

@ -45,7 +45,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 {
@ -59,7 +58,6 @@ 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
@ -87,10 +85,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());}