Class BaseSequentialCommandGroup
java.lang.Object
org.wpilib.command2.Command
xbot.common.command.BaseCommand
xbot.common.command.BaseSequentialCommandGroup
- All Implemented Interfaces:
AutoCloseable, org.wpilib.telemetry.TelemetryLoggable, org.wpilib.tunable.ComplexTunable, TunablePrefixProvider
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.wpilib.command2.Command
org.wpilib.command2.Command.InterruptionBehavior -
Field Summary
Fields inherited from class BaseCommand
aKitLog, log, monitor, runningAlert -
Constructor Summary
ConstructorsConstructorDescriptionBaseSequentialCommandGroup(String name, org.wpilib.command2.Command... commands) BaseSequentialCommandGroup(org.wpilib.command2.Command... commands) Creates a new SequentialCommandGroup. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddCommands(org.wpilib.command2.Command... commands) Adds the given commands to the group.final voidend(boolean interrupted) final voidexecute()org.wpilib.command2.Command.InterruptionBehaviorfinal voidfinal booleanbooleanMethods inherited from class BaseCommand
close, getPrefix, publishToTunables, publishToTunables, setRunsWhenDisabledMethods inherited from class org.wpilib.command2.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, finallyDo, finallyDo, getName, getRequirements, getTelemetryType, getTunableType, handleInterrupt, hasRequirement, ignoringDisable, isScheduled, logTo, onlyIf, onlyWhile, publishTunable, raceWith, repeatedly, setName, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeoutMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wpilib.tunable.ComplexTunable
publishChildTunable, publishChildTunable, removeChildTunable, setChildTunableChanged, updateTunable
-
Constructor Details
-
BaseSequentialCommandGroup
public BaseSequentialCommandGroup(org.wpilib.command2.Command... commands) Creates a new SequentialCommandGroup. The given commands will be run sequentially, with the composition finishing when the last command finishes.- Parameters:
commands- the commands to include in this composition.
-
BaseSequentialCommandGroup
-
-
Method Details
-
addCommands
public final void addCommands(org.wpilib.command2.Command... commands) Adds the given commands to the group.- Parameters:
commands- Commands to add, in order of execution.
-
initialize
public final void initialize()- Overrides:
initializein classBaseCommand
-
execute
public final void execute()- Overrides:
executein classorg.wpilib.command2.Command
-
end
public final void end(boolean interrupted) - Overrides:
endin classBaseCommand
-
isFinished
public final boolean isFinished()- Overrides:
isFinishedin classorg.wpilib.command2.Command
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabledin classBaseCommand
-
getInterruptionBehavior
public org.wpilib.command2.Command.InterruptionBehavior getInterruptionBehavior()- Overrides:
getInterruptionBehaviorin classorg.wpilib.command2.Command
-