Class SubsystemBase
java.lang.Object
org.wpilib.command2.SubsystemBase
A base for subsystems that handles registration in the constructor, and provides a more intuitive
method for setting the default command.
This class is provided by the NewCommands VendorDep
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAssociates aSendablewith this Subsystem.getName()Gets the name of this Subsystem.Gets the subsystem name of this Subsystem.voidinitSendable(SendableBuilder builder) Initializes thisSendableobject.voidSets the name of this Subsystem.voidsetSubsystem(String subsystem) Sets the subsystem name of this Subsystem.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, periodic, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
SubsystemBase
public SubsystemBase()Constructor. Telemetry/log name defaults to the classname. -
SubsystemBase
Constructor.- Parameters:
name- Name of the subsystem for telemetry and logging.
-
-
Method Details
-
getName
-
setName
-
getSubsystem
-
setSubsystem
Sets the subsystem name of this Subsystem.- Parameters:
subsystem- subsystem name
-
addChild
-
initSendable
Description copied from interface:SendableInitializes thisSendableobject.- Specified by:
initSendablein interfaceSendable- Parameters:
builder- sendable builder
-