SendableChooser: Rename addDefault and addObject for clarity (#1239)

Rename addDefault to setDefaultOption and addObject to addOption.

The old names are still available but are marked as deprecated.
This commit is contained in:
Peter Johnson
2018-08-19 01:51:17 -07:00
committed by GitHub
parent fa78f30e30
commit b44f27ddfa
13 changed files with 66 additions and 31 deletions

View File

@@ -62,8 +62,8 @@ public class Robot extends IterativeRobot {
// instantiate the command used for the autonomous period
m_autoChooser = new SendableChooser<Command>();
m_autoChooser.addDefault("Drive and Shoot", new DriveAndShootAutonomous());
m_autoChooser.addObject("Drive Forward", new DriveForward());
m_autoChooser.setDefaultOption("Drive and Shoot", new DriveAndShootAutonomous());
m_autoChooser.addOption("Drive Forward", new DriveForward());
SmartDashboard.putData("Auto Mode", m_autoChooser);
}