Package com.ctre.phoenix.schedulers
Class SequentialScheduler
java.lang.Object
com.ctre.phoenix.schedulers.SequentialScheduler
- All Implemented Interfaces:
ILoopable
Scheduler that will run its ILoopables in sequence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd ILoopable to schedulerGet the currently running ILoopablebooleanisDone()booleaniterated()voidonLoop()Process currently active ILoopablevoidonStart()Start next ILoopablevoidonStop()Stop all ILoopablesvoidprocess()Process the currently active ILoopable Call this every loopvoidRemove all ILoopablesvoidstart()Start next ILoopablevoidstop()Stop every ILoopable
-
Constructor Details
-
SequentialScheduler
Constructor for SequentialScheduler- Parameters:
periodMs- Not used, pass 0
-
-
Method Details
-
add
Add ILoopable to scheduler- Parameters:
aLoop- ILoopable to add
-
getCurrent
Get the currently running ILoopable- Returns:
- null, not implemented
-
removeAll
Remove all ILoopables -
start
Start next ILoopable -
stop
Stop every ILoopable -
process
Process the currently active ILoopable Call this every loop -
iterated
- Returns:
- true if we've just iterated to the next ILoopable
-
onStart
Start next ILoopable -
onLoop
Process currently active ILoopable -
isDone
-
onStop
Stop all ILoopables
-