Package com.cdarobotics.cdalib.tasks
Class SequentialTask
java.lang.Object
com.cdarobotics.cdalib.tasks.Task
com.cdarobotics.cdalib.tasks.SequentialTask
Runs its child tasks one after another, advancing to the next only when the current one finishes.
Completes when the last child finishes (or immediately if there are no children).
-
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
-
SequentialTask
- Parameters:
tasks- the tasks to run in order, one after another.
-
-
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
-