Package xbot.common.command
Class BaseSequentialCommandGroup
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
xbot.common.command.BaseCommand
xbot.common.command.BaseSequentialCommandGroup
- All Implemented Interfaces:
Sendable
,IPropertySupport
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 edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
Fields inherited from class xbot.common.command.BaseCommand
aKitLog, log, monitor, runningAlert
-
Constructor Summary
ConstructorsConstructorDescriptionBaseSequentialCommandGroup
(Command... commands) Creates a new SequentialCommandGroup.BaseSequentialCommandGroup
(String name, Command... commands) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addCommands
(Command... commands) Adds the given commands to the group.final void
end
(boolean interrupted) final void
execute()
final void
void
initSendable
(SendableBuilder builder) final boolean
boolean
Methods inherited from class xbot.common.command.BaseCommand
getPrefix, includeOnSmartDashboard, includeOnSmartDashboard, requires, setRunsWhenDisabled
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
BaseSequentialCommandGroup
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
Adds the given commands to the group.- Parameters:
commands
- Commands to add, in order of execution.
-
initialize
public final void initialize()- Overrides:
initialize
in classBaseCommand
-
execute
public final void execute() -
end
public final void end(boolean interrupted) - Overrides:
end
in classBaseCommand
-
isFinished
public final boolean isFinished()- Overrides:
isFinished
in classCommand
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabled
in classBaseCommand
-
getInterruptionBehavior
- Overrides:
getInterruptionBehavior
in classCommand
-
initSendable
- Specified by:
initSendable
in interfaceSendable
- Overrides:
initSendable
in classCommand
-