Commangu

object Commangu

Utility object for creating various WPILib commands and binding them with names.

Types

Link copied to clipboard

A builder class for creating a ParallelCommandGroup.

Link copied to clipboard

A builder class for creating a SequentialCommandGroup.

Functions

Link copied to clipboard
fun bind(name: String, command: Command): Commangu

Binds a Command to a name and registers it.

Link copied to clipboard
fun cancel(): InstantCommand

Creates an InstantCommand to cancel all running commands.

Link copied to clipboard
fun cmd(vararg reqs: Subsystem, function: () -> Unit): InstantCommand

Creates an InstantCommand that executes the given function.

Link copied to clipboard
fun parallel(block: Commangu.ParallelBuilder.() -> Unit): ParallelCommandGroup

Creates a ParallelCommandGroup that runs the given commands in parallel.

Link copied to clipboard
fun registerCommands(block: BindDsl.() -> Unit)

DSL for registering multiple Commands in a block.

Link copied to clipboard
fun runUntil(vararg reqs: Subsystem, condition: () -> Boolean, function: () -> Unit): ParallelRaceGroup

Creates a RunCommand that runs the given function.

Link copied to clipboard
fun sequential(block: Commangu.SequentialBuilder.() -> Unit): SequentialCommandGroup

Creates a SequentialCommandGroup using the provided block to add commands.

Link copied to clipboard
fun waitFor(seconds: Double): WaitCommand

Creates a WaitCommand to wait for a specified number of seconds.

Link copied to clipboard
fun waitUntil(function: () -> Boolean): WaitUntilCommand

Creates a WaitUntilCommand that waits until the given condition is true.