mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Set a default option for Sendable Chooser in examples (#2361)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -14,7 +14,7 @@ RobotContainer::RobotContainer() {
|
||||
// Initialize all of your commands and subsystems here
|
||||
|
||||
// Add commands to the autonomous command chooser
|
||||
m_chooser.AddOption("Simple Auto", &m_simpleAuto);
|
||||
m_chooser.SetDefaultOption("Simple Auto", &m_simpleAuto);
|
||||
m_chooser.AddOption("Complex Auto", &m_complexAuto);
|
||||
|
||||
// Put the chooser on the dashboard
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -19,7 +19,7 @@ RobotContainer::RobotContainer() {
|
||||
// Initialize all of your commands and subsystems here
|
||||
|
||||
// Add commands to the autonomous command chooser
|
||||
m_chooser.AddOption("Simple Auto", &m_simpleAuto);
|
||||
m_chooser.SetDefaultOption("Simple Auto", &m_simpleAuto);
|
||||
m_chooser.AddOption("Complex Auto", &m_complexAuto);
|
||||
|
||||
// Put the chooser on the dashboard
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -78,7 +78,7 @@ public class RobotContainer {
|
||||
m_driverController.getX(GenericHID.Hand.kRight)), m_robotDrive));
|
||||
|
||||
// Add commands to the autonomous command chooser
|
||||
m_chooser.addOption("Simple Auto", m_simpleAuto);
|
||||
m_chooser.setDefaultOption("Simple Auto", m_simpleAuto);
|
||||
m_chooser.addOption("Complex Auto", m_complexAuto);
|
||||
|
||||
// Put the chooser on the dashboard
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -72,7 +72,7 @@ public class RobotContainer {
|
||||
() -> m_driverController.getX(GenericHID.Hand.kRight)));
|
||||
|
||||
// Add commands to the autonomous command chooser
|
||||
m_chooser.addOption("Simple Auto", m_simpleAuto);
|
||||
m_chooser.setDefaultOption("Simple Auto", m_simpleAuto);
|
||||
m_chooser.addOption("Complex Auto", m_complexAuto);
|
||||
|
||||
// Put the chooser on the dashboard
|
||||
|
||||
Reference in New Issue
Block a user