Class ParallelTask

java.lang.Object
com.cdarobotics.cdalib.tasks.Task
com.cdarobotics.cdalib.tasks.ParallelTask

public class ParallelTask extends Task
Runs all of its child tasks at once. Each child is polled until it finishes; the group completes when every child has finished.
  • Constructor Details

    • ParallelTask

      public ParallelTask(Task... tasks)
      Parameters:
      tasks - the tasks to run at once; the group finishes when all of them finish.
  • Method Details

    • init

      public void init()
      Description copied from class: Task
      Called once before the first Task.run(). Set up state and issue starting commands here.
      Specified by:
      init in class Task
    • run

      public boolean run()
      Description copied from class: Task
      Called every loop after Task.init().
      Specified by:
      run in class Task
      Returns:
      true when the task is finished, false to keep running.
    • toString

      @NonNull public String toString()
      Specified by:
      toString in class Task