Package edu.wpi.first.wpilibj.command
Class PrintCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj.command.Command
-
- edu.wpi.first.wpilibj.command.InstantCommand
-
- edu.wpi.first.wpilibj.command.PrintCommand
-
- All Implemented Interfaces:
Sendable
,AutoCloseable
public class PrintCommand extends InstantCommand
APrintCommand
is a command which prints out a string when it is initialized, and then immediately finishes. It is useful if you want aCommandGroup
to print out a string when it reaches a certain point.
-
-
Constructor Summary
Constructors Constructor Description PrintCommand(String message)
Instantiates aPrintCommand
which will print the given message when it is run.
-
Method Summary
All Methods Instance Methods Concrete Methods 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.InstantCommand
_initialize, isFinished
-
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 Detail
-
PrintCommand
public PrintCommand(String message)
Instantiates aPrintCommand
which will print the given message when it is run.- Parameters:
message
- the message to print
-
-
Method Detail
-
initialize
protected void 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
-
-