Robot Core Documentation
|
Additional Inherited Members | |
![]() | |
Command () | |
![]() | |
Set< Subsystem > | m_requirements = new HashSet<>() |
A command composition that runs a list of commands in sequence.
The rules for command compositions apply: command instances that are passed to it cannot be added to any other composition or scheduled individually, and the composition requires all subsystems its components require.
This class is provided by the NewCommands VendorDep
edu.wpi.first.wpilibj2.command.SequentialCommandGroup.SequentialCommandGroup | ( | Command... | commands | ) |
Creates a new SequentialCommandGroup. The given commands will be run sequentially, with the composition finishing when the last command finishes.
commands | the commands to include in this composition. |
final void edu.wpi.first.wpilibj2.command.SequentialCommandGroup.addCommands | ( | Command... | commands | ) |
Adds the given commands to the group.
commands | Commands to add, in order of execution. |
final void edu.wpi.first.wpilibj2.command.SequentialCommandGroup.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.
final void edu.wpi.first.wpilibj2.command.SequentialCommandGroup.execute | ( | ) |
The main body of a command. Called repeatedly while the command is scheduled.
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
InterruptionBehavior edu.wpi.first.wpilibj2.command.SequentialCommandGroup.getInterruptionBehavior | ( | ) |
How the command behaves when another command with a shared requirement is scheduled.
InterruptionBehavior
, defaulting to kCancelSelf
. Reimplemented from edu.wpi.first.wpilibj2.command.Command.
final void edu.wpi.first.wpilibj2.command.SequentialCommandGroup.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.SequentialCommandGroup.initSendable | ( | SendableBuilder | builder | ) |
Initializes this Sendable
object.
builder | sendable builder |
Reimplemented from edu.wpi.first.wpilibj2.command.Command.
final boolean edu.wpi.first.wpilibj2.command.SequentialCommandGroup.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.SequentialCommandGroup.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.