Package com.cdarobotics.cdalib.tasks
Class BasicTask
java.lang.Object
com.cdarobotics.cdalib.tasks.Task
com.cdarobotics.cdalib.tasks.BasicTask
A task built from lambdas:
init runs once, then run is polled each loop and
returns true when the task is finished.-
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
-
BasicTask
- Parameters:
init- runs once when the task startsrun- polled each loop; returntruewhen the task is finished
-
-
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
-