Package edu.wpi.first.wpilibj2.command
Class PrintCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.CommandBase
-
- edu.wpi.first.wpilibj2.command.InstantCommand
-
- edu.wpi.first.wpilibj2.command.PrintCommand
-
public class PrintCommand extends InstantCommand
A command that prints a string when initialized.
-
-
Field Summary
-
Fields inherited from class edu.wpi.first.wpilibj2.command.CommandBase
m_requirements
-
-
Constructor Summary
Constructors Constructor Description PrintCommand(String message)
Creates a new a PrintCommand.
-
Method Summary
All Methods Instance Methods Concrete Methods 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.InstantCommand
initialize, isFinished
-
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem, withName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wpi.first.wpilibj2.command.Command
alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineWith, end, execute, hasRequirement, isScheduled, perpetually, raceWith, schedule, schedule, withInterrupt, withTimeout
-
-
-
-
Constructor Detail
-
PrintCommand
public PrintCommand(String message)
Creates a new a PrintCommand.- Parameters:
message
- the message to print
-
-
Method Detail
-
runsWhenDisabled
public boolean runsWhenDisabled()
Description copied from interface:Command
Whether the given command should run when the robot is disabled. Override to return true if the command should run when disabled.- Returns:
- whether the command should run when the robot is disabled
-
-