mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user