From c6146e2a3b5dc75c4e368934fbc0e4010d45ad04 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Wed, 15 Mar 2023 18:18:59 -0400 Subject: [PATCH] xvcb --- src/main/java/frc/robot/RobotContainer.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index de3edd1..f5a5bc2 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -7,6 +7,8 @@ import java.util.Map; import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.networktables.GenericEntry; +import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; +import edu.wpi.first.wpilibj.shuffleboard.BuiltInWidgets; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; @@ -70,11 +72,12 @@ String enhaut = "en bas"; String aumilieux = "au milieux"; String enbas = "en bas"; String nulpart = "nul part"; -ShuffleboardLayout layoutauto = Shuffleboard.getTab("teb").getLayout("auto"); -GenericEntry autobalance = layoutauto.add("choix balance",true).getEntry(); -GenericEntry autosortir = layoutauto.add("choix sorit",false).getEntry(); +ShuffleboardLayout layoutauto = Shuffleboard.getTab("teb").getLayout("auto",BuiltInLayouts.kList) +.withSize(2,2).withProperties(Map.of("Label position","LEFT")); +GenericEntry autobalance = layoutauto.add("choix balance",true).withWidget(BuiltInWidgets.kToggleSwitch).getEntry(); +GenericEntry autosortir = layoutauto.add("choix sorit",false).withWidget(BuiltInWidgets.kToggleSwitch).getEntry(); public RobotContainer() { - chooser.setDefaultOption(enhaut, enhaut); + chooser.addOption(enhaut, enhaut); chooser.addOption(enbas, enbas); chooser.addOption(aumilieux, aumilieux); chooser.addOption(nulpart, nulpart);