This commit is contained in:
Antoine PerreaultE 2023-03-20 18:08:00 -04:00
parent 8ba1721503
commit ee40b0a976

View File

@ -56,6 +56,7 @@ public class RobotContainer {
CommandXboxController manette1 = new CommandXboxController(0); CommandXboxController manette1 = new CommandXboxController(0);
CommandXboxController manette2 = new CommandXboxController(1); CommandXboxController manette2 = new CommandXboxController(1);
// dashboard
SendableChooser<String> chooser = new SendableChooser<>(); SendableChooser<String> chooser = new SendableChooser<>();
String enhaut = "en haut"; String enhaut = "en haut";
String aumilieux = "au milieux"; String aumilieux = "au milieux";
@ -68,6 +69,7 @@ GenericEntry autosortir = layoutauto.add("choix sortir",false).withWidget(BuiltI
GenericEntry reculerdistances = layoutauto.addPersistent("reculerdistancesortir",0).getEntry(); GenericEntry reculerdistances = layoutauto.addPersistent("reculerdistancesortir",0).getEntry();
GenericEntry reculerdistanceb = layoutauto.addPersistent("reculerdistancebalance", 0).getEntry(); GenericEntry reculerdistanceb = layoutauto.addPersistent("reculerdistancebalance", 0).getEntry();
GenericEntry avancerdistance = layoutauto.addPersistent("avancer",0).getEntry(); GenericEntry avancerdistance = layoutauto.addPersistent("avancer",0).getEntry();
// subsystems // subsystems
BasePilotable basePilotable = new BasePilotable(); BasePilotable basePilotable = new BasePilotable();
Gratte gratte = new Gratte(); Gratte gratte = new Gratte();
@ -75,6 +77,7 @@ BrasTelescopique brasTelescopique = new BrasTelescopique();
Pince pince = new Pince(); Pince pince = new Pince();
Pivot pivot = new Pivot(); Pivot pivot = new Pivot();
Limelight limelight = new Limelight(); Limelight limelight = new Limelight();
//commands //commands
BrakeFerme brakeFerme = new BrakeFerme(basePilotable); BrakeFerme brakeFerme = new BrakeFerme(basePilotable);
BrakeOuvre brakeOuvre = new BrakeOuvre(basePilotable); BrakeOuvre brakeOuvre = new BrakeOuvre(basePilotable);
@ -134,7 +137,7 @@ public RobotContainer() {
manette2.b().whileTrue(gratteBaisser); manette2.b().whileTrue(gratteBaisser);
} }
//mode auto
public Command getAutonomousCommand() { public Command getAutonomousCommand() {
chooser.getSelected(); chooser.getSelected();
autobalance.getBoolean(true); autobalance.getBoolean(true);