Package com.cdarobotics.cdalib.tasks
Class RaceTask
java.lang.Object
com.cdarobotics.cdalib.tasks.Task
com.cdarobotics.cdalib.tasks.RaceTask
Runs all of its child tasks at once and completes as soon as any one of them finishes. The
remaining tasks are simply no longer polled.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Called once before the firstTask.run().booleanrun()Called every loop afterTask.init().toString()Methods inherited from class com.cdarobotics.cdalib.tasks.Task
alongWith, andThen, raceWith, withDeadline
-
Constructor Details
-
RaceTask
- Parameters:
tasks- the tasks to run at once; the group finishes as soon as any one finishes.
-
-
Method Details
-
init
public void init()Description copied from class:TaskCalled once before the firstTask.run(). Set up state and issue starting commands here. -
run
public boolean run()Description copied from class:TaskCalled every loop afterTask.init(). -
toString
-