|
ThunderLib
|
#include <ThunderAutoSendableChooser.hpp>
Public Member Functions | |
| ThunderAutoSendableChooser () noexcept | |
| ThunderAutoSendableChooser (std::string_view smartDashboardKey) noexcept | |
| ThunderAutoSendableChooser (const TrajectoryRunnerProperties &runnerProps) noexcept | |
| ThunderAutoSendableChooser (std::string_view smartDashboardKey, const TrajectoryRunnerProperties &runnerProps) noexcept | |
| void | setTrajectoryRunnerProperties (const TrajectoryRunnerProperties &runnerProps) noexcept |
| void | publish (std::string_view smartDashboardKey) noexcept |
| void | includeProjectSource (std::shared_ptr< ThunderAutoProject > project, bool addAllAutoModes=false, bool addAllTrajectories=false) noexcept |
| void | addAllTrajectoriesFromProject (const std::string &projectName) noexcept |
| void | addAllAutoModesFromProject (const std::string &projectName) noexcept |
| bool | addTrajectoryFromProject (const std::string &projectName, const std::string &trajectoryName) noexcept |
| bool | addAutoModeFromProject (const std::string &projectName, const std::string &autoModeName) noexcept |
| bool | addCustomCommand (const std::string &name, frc2::CommandPtr command) noexcept |
| bool | addCustomCommand (const std::string &name, std::shared_ptr< frc2::Command > command) noexcept |
| frc2::CommandPtr | getSelectedCommand () const noexcept |
| ThunderAutoSendableChooserSelection | getSelected () const noexcept |
| driver::ThunderAutoSendableChooser * | getHandle () noexcept |
| const driver::ThunderAutoSendableChooser * | getHandle () const noexcept |
A wrapper around frc::SendableChooser to handle ThunderAuto trajectory, auto mode, and command selections.
This chooser will automatically update its options when the associated project gets updated.
|
noexcept |
Default constructor. The chooser will not be published to SmartDashboard until publish() is called.
|
explicitnoexcept |
Constructs an empty chooser and publishes it to SmartDashboard under the given key.
| smartDashboardKey | The key in SmartDashboard to publish the chooser under. |
|
explicitnoexcept |
Constructs a chooser with the given trajectory runner properties. The chooser will not be published to SmartDashboard until publish() is called.
| runnerProps | The trajectory runner properties to use for making trajectory commands. |
|
noexcept |
Constructs a chooser with the given trajectory runner properties and publishes it to SmartDashboard under the given key.
| smartDashboardKey | The key in SmartDashboard to publish the chooser under. |
| runnerProps | The trajectory runner properties to use for making trajectory commands. |
|
noexcept |
Add all auto modes from a previously included project to the chooser.
| projectName | The name of the project to add auto modes from. This must match the name of a project previously included using includeProjectSource(). |
|
noexcept |
Add all trajectories from a previously included project to the chooser.
| projectName | The name of the project to add trajectories from. This must match the name of a project previously included using includeProjectSource(). |
|
noexcept |
Add an auto mode from a previously included project to the chooser.
| projectName | The name of the project to add the auto mode from. This must match the name of a project previously included using includeProjectSource(). |
| autoModeName | The name of the auto mode to add from the project. |
|
noexcept |
Add a custom command to the chooser.
| name | The name of the custom command. |
| command | The command to add. |
|
noexcept |
Add a custom command to the chooser.
| name | The name of the custom command. |
| command | The command to add. |
|
noexcept |
Add a trajectory from a previously included project to the chooser.
| projectName | The name of the project to add the trajectory from. This must match the name of a project previously included using includeProjectSource(). |
| trajectoryName | The name of the trajectory to add from the project. |
|
noexcept |
Get the currently selected item from the chooser.
|
noexcept |
Get the currently selected command from the chooser.
|
noexcept |
Include a ThunderAuto project as a source for trajectories and auto modes. Trajectories and auto modes from this project can later be added to the chooser using the appropriate methods.
| project | The ThunderAuto project to include. |
| addAllAutoModes | If true, all auto modes from the project will be added to the chooser. |
| addAllTrajectories | If true, all trajectories from the project will be added to the chooser. |
|
noexcept |
Publishes the chooser to SmartDashboard. This only needs to be called once, as the chooser will automatically refresh the chooser when changes are made.
| smartDashboardKey | The key to publish the chooser under. |
|
noexcept |
Sets the trajectory runner properties to use for making trajectory commands.
| runnerProps | The trajectory runner properties to set. |