Compare commits

...

2 Commits

Author SHA1 Message Date
samuel desharnais
f7daa030bd Merge branch 'main' of https://git.demerso.net/PLS5618/pratique-2025 2024-11-25 19:30:40 -05:00
samuel desharnais
d64509b3aa j 2024-11-25 19:30:22 -05:00

View File

@ -4,8 +4,8 @@
package frc.robot; package frc.robot;
import com.pathplanner.lib.auto.AutoBuilder; //import com.pathplanner.lib.auto.AutoBuilder;
import com.pathplanner.lib.auto.NamedCommands; //import com.pathplanner.lib.auto.NamedCommands;
import edu.wpi.first.math.MathUtil; import edu.wpi.first.math.MathUtil;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
@ -23,7 +23,7 @@ import frc.robot.Subsystems.Lanceur;
import frc.robot.Subsystems.Limelight3G; import frc.robot.Subsystems.Limelight3G;
public class RobotContainer { public class RobotContainer {
private final SendableChooser<Command> autoChooser; // private final SendableChooser<Command> autoChooser;
Lanceur lanceur= new Lanceur(); Lanceur lanceur= new Lanceur();
Accumulateur accumulateur = new Accumulateur(); Accumulateur accumulateur = new Accumulateur();
Limelight3G limelight3G = new Limelight3G(); Limelight3G limelight3G = new Limelight3G();
@ -31,8 +31,8 @@ public class RobotContainer {
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
CommandXboxController manette = new CommandXboxController(0); CommandXboxController manette = new CommandXboxController(0);
public RobotContainer() { public RobotContainer() {
NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur)); // NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur));
autoChooser = AutoBuilder.buildAutoChooser(); // autoChooser = AutoBuilder.buildAutoChooser();
dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800") dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800")
.withSize(3,4) .withSize(3,4)
.withPosition(5,0); .withPosition(5,0);
@ -43,9 +43,15 @@ public class RobotContainer {
drive.setDefaultCommand(new RunCommand(()->{ drive.setDefaultCommand(new RunCommand(()->{
drive.drive(-MathUtil.applyDeadband(manette.getRightX(),0.2), MathUtil.applyDeadband(-manette.getRightY(),0.2), MathUtil.applyDeadband(-manette.getRightX(), 0.2)); drive.drive(-MathUtil.applyDeadband(manette.getRightX(),0.2), MathUtil.applyDeadband(-manette.getRightY(),0.2), MathUtil.applyDeadband(-manette.getRightX(), 0.2));
},drive)); },drive));
<<<<<<< HEAD
// dashboard.add("autochooser",autoChooser)
// .withSize(1,1)
// .withPosition(6,0);
=======
dashboard.add("autochooser",autoChooser) dashboard.add("autochooser",autoChooser)
.withSize(1,1) .withSize(1,1)
.withPosition(8,0); .withPosition(8,0);
>>>>>>> 3f240407849e489fb0b5fae52b61719f27c7b388
} }
private void configureBindings() { private void configureBindings() {
@ -56,6 +62,6 @@ public class RobotContainer {
} }
public Command getAutonomousCommand() { public Command getAutonomousCommand() {
return autoChooser.getSelected(); return null;
} }
} }