Auto Chooser Set Default / add option order

Many of the code examples for at least Java Command Base have the set the .setDefaultOption as the last line after the .addOption

Does it mater if its the last thing added to the? Doesn’t seem like it should.

        auto_chooser.setDefaultOption("Auto 1", new auto1);
        auto_chooser.addOption("Auto 2", new auto2);
        auto_chooser.addOption("Auto 3", new auto3);
        auto_chooser.addOption("Auto 4", new auto4);
        auto_chooser.addOption("Auto 5", new auto5);
// exsample have it here: auto_chooser.setDefaultOption("Auto 1", new auto1);        
        SmartDashboard.putData(auto_chooser);

Yeah it does not matter, functions the same

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.