Package edu.wpi.first.wpilibj.command
Class StartCommand
java.lang.Object
edu.wpi.first.wpilibj.command.Command
edu.wpi.first.wpilibj.command.InstantCommand
edu.wpi.first.wpilibj.command.StartCommand
- All Implemented Interfaces:
Sendable
,AutoCloseable
public class StartCommand extends InstantCommand
A
StartCommand
will call the start()
method of another command
when it is initialized and will finish immediately.-
Constructor Summary
Constructors Constructor Description StartCommand(Command commandToStart)
Instantiates aStartCommand
which will start the given command whenever itsinitialize()
is called. -
Method Summary
Modifier and Type Method Description protected void
initialize()
The initialize method is called the first time this Command is run after being started.Methods inherited from class edu.wpi.first.wpilibj.command.Command
cancel, clearRequirements, close, doesRequire, end, execute, getGroup, getName, getSubsystem, initSendable, interrupted, isCanceled, isCompleted, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setName, setRunWhenDisabled, setSubsystem, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled
-
Constructor Details
-
StartCommand
Instantiates aStartCommand
which will start the given command whenever itsinitialize()
is called.- Parameters:
commandToStart
- theCommand
to start
-
-
Method Details
-
initialize
Description copied from class:Command
The initialize method is called the first time this Command is run after being started.- Overrides:
initialize
in classCommand
-