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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addOption(edu.wpi.first.wpilibj2.command.Command object)
    Adds the command object to the smart dashboard.
    void
    setDefaultOption(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.