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

@@ -29,8 +29,8 @@ void Robot::RobotInit() {
frc::SmartDashboard::PutData(&pneumatics);
// instantiate the command used for the autonomous period
m_autoChooser.AddDefault("Drive and Shoot", &m_driveAndShootAuto);
m_autoChooser.AddObject("Drive Forward", &m_driveForwardAuto);
m_autoChooser.SetDefaultOption("Drive and Shoot", &m_driveAndShootAuto);
m_autoChooser.AddOption("Drive Forward", &m_driveForwardAuto);
frc::SmartDashboard::PutData("Auto Mode", &m_autoChooser);
pneumatics.Start(); // Pressurize the pneumatics.