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
A
PrintCommand is a command which prints out a string when it is initialized, and then
immediately finishes. It is useful if you want a CommandGroup to print out a string when
it reaches a certain point.-
Constructor Summary
Constructors Constructor Description PrintCommand(String message)Instantiates aPrintCommandwhich will print the given message when it is run. -
Method Summary
Modifier and Type Method Description protected voidinitialize()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
-
PrintCommand
Instantiates aPrintCommandwhich will print the given message when it is run.- Parameters:
message- the message to print
-
-
Method Details
-
initialize
Description copied from class:CommandThe initialize method is called the first time this Command is run after being started.- Overrides:
initializein classCommand
-