Package edu.wpi.first.wpilibj2.command
Class PrintCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.FunctionalCommand
edu.wpi.first.wpilibj2.command.InstantCommand
edu.wpi.first.wpilibj2.command.PrintCommand
- All Implemented Interfaces:
Sendable
public class PrintCommand extends InstantCommand
A command that prints a string when initialized.
This class is provided by the NewCommands VendorDep
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PrintCommand(String message)
Creates a new a PrintCommand. -
Method Summary
Modifier and Type Method Description boolean
runsWhenDisabled()
Whether the given command should run when the robot is disabled.Methods inherited from class edu.wpi.first.wpilibj2.command.FunctionalCommand
end, execute, initialize, isFinished
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, schedule, setName, setSubsystem, unless, until, withInterruptBehavior, withName, withTimeout
-
Constructor Details
-
PrintCommand
Creates a new a PrintCommand.- Parameters:
message
- the message to print
-
-
Method Details
-
runsWhenDisabled
Description copied from class:Command
Whether the given command should run when the robot is disabled. Override to return true if the command should run when disabled.- Overrides:
runsWhenDisabled
in classCommand
- Returns:
- whether the command should run when the robot is disabled
-