Robot Core Documentation
|
Additional Inherited Members | |
![]() | |
Command () | |
![]() | |
Set< Subsystem > | m_requirements = new HashSet<>() |
Schedules the given command when this command is initialized, and ends when it ends. Useful for forking off from CommandGroups. If this command is interrupted, it will cancel the command.
This class is provided by the NewCommands VendorDep
edu.wpi.first.wpilibj2.command.ProxyCommand.ProxyCommand | ( | Supplier< Command > | supplier | ) |
Creates a new ProxyCommand that schedules the supplied command when initialized, and ends when it is no longer scheduled. Useful for lazily creating commands at runtime.
supplier | the command supplier |
edu.wpi.first.wpilibj2.command.ProxyCommand.ProxyCommand | ( | Command | command | ) |
Creates a new ProxyCommand that schedules the given command when initialized, and ends when it is no longer scheduled.
command | the command to run by proxy |
void edu.wpi.first.wpilibj2.command.ProxyCommand.end | ( | boolean | interrupted | ) |
The action to take when the command ends. Called when either the command finishes normally, or when it interrupted/canceled.
Do not schedule commands here that share requirements with this command. Use andThen(Command...)
instead.
interrupted | whether the command was interrupted/canceled |
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
void edu.wpi.first.wpilibj2.command.ProxyCommand.execute | ( | ) |
The main body of a command. Called repeatedly while the command is scheduled.
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
void edu.wpi.first.wpilibj2.command.ProxyCommand.initialize | ( | ) |
The initial subroutine of a command. Called once when the command is initially scheduled.
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
void edu.wpi.first.wpilibj2.command.ProxyCommand.initSendable | ( | SendableBuilder | builder | ) |
Initializes this Sendable
object.
builder | sendable builder |
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
boolean edu.wpi.first.wpilibj2.command.ProxyCommand.isFinished | ( | ) |
Whether the command has finished. Once a command finishes, the scheduler will call its end() method and un-schedule it.
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
boolean edu.wpi.first.wpilibj2.command.ProxyCommand.runsWhenDisabled | ( | ) |
Whether the given command should run when the robot is disabled. Override to return true if the command should run when disabled.
Reimplemented from edu.wpi.first.wpilibj2.command.Command.