Allow user to select from auto routines using the default dashboard autonomous selector.
More...
#include <auto_selector.h>
Allow user to select from auto routines using the default dashboard autonomous selector.
- Copyright
- Copyright (c) Argos FRC Team 1756. Open Source Software; you can modify and/or share it under the terms of the license file in the root directory of this project.
◆ AutoSelector() [1/2]
AutoSelector::AutoSelector |
( |
| ) |
|
Initialize with no available auto routines. More may be added later.
- Copyright
- Copyright (c) Argos FRC Team 1756. Open Source Software; you can modify and/or share it under the terms of the license file in the root directory of this project.
◆ AutoSelector() [2/2]
Initialize with specified commands. More may be added later.
- Parameters
-
commands | List of commands to allow user to select from |
defaultCommand | Command to run if selection is invalid. nullptr indicates run no command. |
◆ AddCommand() [1/2]
Add a single command to the selector.
- Parameters
-
◆ AddCommand() [2/2]
void AutoSelector::AddCommand |
( |
std::initializer_list< AutonomousCommand * > |
commands | ) |
|
Add a set of commands to the selector.
- Parameters
-
◆ GetSelectedCommand()
frc2::Command * AutoSelector::GetSelectedCommand |
( |
| ) |
const |
Get the command selected by the user on the dashboard. Will return default command if no match is found.
- Returns
- frc2::Command* Selected command
◆ SetDefaultCommand()
Set the default command to run if user selection is invalid.
- Parameters
-
defaultCommand | Default command. nullptr indicates run no command |
◆ UpdateSelectorEntries()
void AutoSelector::UpdateSelectorEntries |
( |
| ) |
const |
|
private |
Update dashboard with latest command list.
◆ m_commands
All autonomous commands that can be selected.
◆ m_default
Command to run if dashboard selection is invalid.
◆ m_log
The documentation for this class was generated from the following files: