So for a while the SmartDashboard has been working fine with the autonomous sendable chooser, but after our first competition the sendable chooser does not pop up on the Smart Dashboard.
public void robotInit() {
Robot.navx.resetDisplacement();
CameraServer.getInstance().startAutomaticCapture();
autoChooser = new SendableChooser();
autoChooser.addDefault("DRIVE FORWARD FOR 5 POINTS", new driveForward(130));
autoChooser.addObject("Blue Middle", new driveForward(83));
autoChooser.addObject("Blue Right", new autonomousCurve(108,120,45));
autoChooser.addObject("Blue Left", new autonomousCurve(108,120,-45));
autoChooser.addObject("Red Right",new autonomousCurve(108,120,-45));
autoChooser.addObject("Red Left", new autonomousCurve(108,120,45));
autoChooser.addObject("Red Middle", new driveForward(83));
SmartDashboard.putData("Autonomous mode chooser", autoChooser);
oi = new OI();
prefs = Preferences.getInstance();
// instantiate the command used for the autonomous period
// table = NetworkTable.getTable("Vision");
}
If you did an update, one of the recent ones changed how SendableChooser worked in the SmartDashboard.exe.
The way we fixed this was to close the SmartDahboard.exe, go to the user’s home folder(C:/users/USER_NAME/) and find the folder labeled SmartDashboard, go in and delete the save.xml. This will delete the saved dashboard layout. I may have gotten the save path wrong, so don’t call me on that.
Given that you say it worked before, and doesn’t now, this is why I think this might be the solution. You should see, before this fix, the SmartDashboard.exe is connected to the robot. The problem is some I reference is some sort of mismatch with the saved layout.
Previous year’s issue with the Autonomous chooser was with the fact that it only operated over mDNS, so when the DriverStation resolved the RoboRIO address via DNS, the SmartDashboard.exe sat around waiting for mDNS to resolve.