View Single Post
  #1   Spotlight this post!  
Unread 24-02-2012, 18:14
evilcrouton evilcrouton is offline
Registered User
FRC #2851
 
Join Date: Feb 2011
Location: Behind yOU
Posts: 11
evilcrouton is an unknown quantity at this point
Exclamation SmartDashboard's sendableChooser

I see that you can use Smartdashboard's sendableChooser to create radio buttons to choose autonomous programs with command-based programming. However, is it possible to do this with iterative robot? This is what i have in robotInit():

Code:
        NetworkTable.initialize();
        autoChooser = new SendableChooser();
        autoChooser.addDefault("Default program", new Autonomous1());
        autoChooser.addObject("Experimental auto", new Autonomous2());
        SmartDashboard.putData("Autonomous mode chooser", autoChooser);
Where Autonomous1() and Autonomous2() are new classes with autonomous code. With this code, SmartDashboard displays two radio buttons. Now here comes the tricky part. What do I do in autonomousPeriodic() to choose what is selected?
Reply With Quote