Quote:
Originally Posted by DavisC
How would I do that? (I have only ever worked with the default dashboard, and I only used the camera feed from that)
-Davis
|
Here's my code, in Java
Code:
public void robotInit() {
// Create a switching autonomous mode
autoSwitcher = new SendableChooser();
autoSwitcher.addDefault("Auto 0", new Auton0());
autoSwitcher.addObject("Auto 1", new Auton1());
autoSwitcher.addObject("Auto 2", new Auton2());
SmartDashboard.putData("Auto Switcher", autoSwitcher);
}
public void autonomousInit() {
autonomousCommand = autoSwitcher.getSelected();
autonomousCommand.start();
}