Package org.wpilib.commands3
Class ParallelGroup
java.lang.Object
org.wpilib.commands3.ParallelGroup
- All Implemented Interfaces:
Command
A type of command that runs multiple other commands in parallel. The group will end after all
required commands have completed; if no command is explicitly required for completion, then the
group will end after any command in the group finishes. Any commands still running when the group
has reached its completion condition will be canceled.
-
Field Summary
Fields inherited from interface org.wpilib.commands3.Command
DEFAULT_PRIORITY, HIGHEST_PRIORITY, LOWEST_PRIORITY -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wpilib.commands3.Command
alongWith, andThen, conflictsWith, isLowerPriorityThan, onCancel, raceWith, requires, until, withTimeout
-
Method Details
-
run
Description copied from interface:CommandRuns the command. Commands that need to periodically run until a goal state is reached should simply run a while loop likewhile (!atGoal()) { ... }and callCoroutine.yield()at the end of the loop.Warning: any loops in a command must call
coroutine.yield(). Failure to do so will prevent anything else in your robot code from running. Commands are opt-in collaborative constructs; don't be greedy! -
name
Description copied from interface:CommandThe name of the command. -
requirements
Description copied from interface:CommandThe mechanisms required by the command. This is used by the scheduler to determine if two commands conflict with each other. No mechanism may be required by more than one running command at a time.- Specified by:
requirementsin interfaceCommand- Returns:
- the set of mechanisms required by the command
-
priority
Description copied from interface:CommandThe priority of the command. If a command is scheduled that conflicts with another running or pending command, their priority values are compared to determine which should run. If the scheduled command is lower priority than the running command, then it will not be scheduled and the running command will continue to run. If it is the same or higher priority, then the running command will be canceled and the scheduled command will start to run. -
toString
-