Issue Recieving FMS Data [Java]

Do something like this:

        chooser.addDefault("Cross Line", "AutoCrossLine");
        chooser.addObject("RED Scale", "AutoRedScale");
        chooser.addObject("RED Switch", "AutoRedSwitch");
        chooser.addObject("BLUE Scale", "AutoBlueScale");        
        chooser.addObject("BLUE Switch", "AutoBlueSwitch);
        chooser.addObject("Do Nothing", "AutoDoNothing");
        SmartDashboard.putData("Autonomous mode chooser", chooser);

And then in your autonomousInit() do something like:


  String value = (String) chooser.getSelected();
  Command cmd;
  if (value == null) {
    ...
  } else if (value.equals("AutoCrossLine")) {
    cmd = new AutoCrossLine();
  } else if (value.equals("AutoRedScale")) {
    cmd = new AutoRedScale();
  } ...