Package com.acmerobotics.roadrunner
Class RaceAction
-
- All Implemented Interfaces:
-
com.acmerobotics.roadrunner.Action
public final class RaceAction implements Action
Action combinator that executes the action group actions in parallel. Each call to run on this action calls run on every live child action in the order provided. Once one action ends, all other actions are ended.
-
-
Constructor Summary
Constructors Constructor Description RaceAction(Action actions)RaceAction(List<Action> actions)
-
Method Summary
Modifier and Type Method Description final List<Action>getActions()Booleanrun(TelemetryPacket p)Runs a single uninterruptible block. Unitpreview(Canvas fieldOverlay)Draws a preview of the action on canvas fieldOverlay. -
-
Method Detail
-
getActions
final List<Action> getActions()
-
run
Boolean run(TelemetryPacket p)
Runs a single uninterruptible block. Returns true if the action should run again and false if it has completed. A telemetry packet p is provided to record any information on the action's progress.
-
preview
Unit preview(Canvas fieldOverlay)
Draws a preview of the action on canvas fieldOverlay.
-
-
-
-