Package lib.custom
Class CommandSendableChooser
java.lang.Object
edu.wpi.first.wpilibj.smartdashboard.SendableChooser<edu.wpi.first.wpilibj2.command.Command>
lib.custom.CommandSendableChooser
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,AutoCloseable
public class CommandSendableChooser
extends edu.wpi.first.wpilibj.smartdashboard.SendableChooser<edu.wpi.first.wpilibj2.command.Command>
A SendableChooser for commands. This allows us to put a command choice on the
smart dashboard.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOption(edu.wpi.first.wpilibj2.command.Command object) Adds the command object to the smart dashboard.voidsetDefaultOption(edu.wpi.first.wpilibj2.command.Command object) Adds the command object to the smart dashboard as the default command.Methods inherited from class edu.wpi.first.wpilibj.smartdashboard.SendableChooser
addOption, close, getSelected, initSendable, onChange, setDefaultOption
-
Constructor Details
-
CommandSendableChooser
public CommandSendableChooser()
-
-
Method Details
-
addOption
public void addOption(edu.wpi.first.wpilibj2.command.Command object) Adds the command object to the smart dashboard. -
setDefaultOption
public void setDefaultOption(edu.wpi.first.wpilibj2.command.Command object) Adds the command object to the smart dashboard as the default command.
-