ParallelRaceGroup

class ParallelRaceGroup(val commands: Command) : CommandGroup

A CommandGroup that runs all of its children simultaneously until one of its children is done, at which point it stops all of its children.

Constructors

Link copied to clipboard
constructor(vararg commands: Command)

Properties

Link copied to clipboard

The collection of all commands within this group.

Link copied to clipboard
Link copied to clipboard
open override val interruptible: Boolean

Whether this command can be stopped due to a conflict of Subsystems.

Link copied to clipboard
open override val isDone: Boolean

This will return false until one of its children is done

Link copied to clipboard
open override val subsystems: Set<Subsystem>

Overrides the Command.subsystems variable to inherit all subsystems from all of its children.

Functions

Link copied to clipboard

Returns a SequentialGroup with a Delay and then this command

Link copied to clipboard
fun and(vararg commands: Command): ParallelGroup

Returns a ParallelGroup with this command and an arbitrary number of other commands

Link copied to clipboard

Returns a ParallelDeadlineGroup with this command as the deadline

Link copied to clipboard

Returns a ParallelRaceGroup with this command and a Delay of time

Link copied to clipboard
operator fun invoke()

Allows you to directly "call" a command

Link copied to clipboard

Returns a PerpetualCommand that wraps this command

Link copied to clipboard
fun raceWith(vararg commands: Command): ParallelRaceGroup

Returns a ParallelRaceGroup with this command and an arbitrary number of other commands

Link copied to clipboard

Sets whether this command is interruptible. This functionality is similar to a builder class, so you can use it inline with the Command Group declaration.

Link copied to clipboard
open override fun start()

In a Parallel Group, we can just straight away add all of the commands to the CommandManager, which can take care of the rest.

Link copied to clipboard
open override fun stop(interrupted: Boolean)

Called once when the command is stopped.

Link copied to clipboard
fun then(vararg commands: Command): SequentialGroup

Returns a SequentialGroup with this command and an arbitrary number of other commands

Link copied to clipboard

Returns a SequentialGroup with this command and then a Delay

Link copied to clipboard
open fun update()

Called repeatedly while the command is running.

Link copied to clipboard

Returns a ParallelDeadlineGroup with this command and the passed command as the deadline