Class SequentialScheduler

java.lang.Object
com.ctre.phoenix.schedulers.SequentialScheduler
All Implemented Interfaces:
ILoopable

public class SequentialScheduler extends Object implements ILoopable
Scheduler that will run its ILoopables in sequence
  • Constructor Details

    • SequentialScheduler

      public SequentialScheduler(int periodMs)
      Constructor for SequentialScheduler
      Parameters:
      periodMs - Not used, pass 0
  • Method Details

    • add

      public void add(ILoopable aLoop)
      Add ILoopable to scheduler
      Parameters:
      aLoop - ILoopable to add
    • getCurrent

      Get the currently running ILoopable
      Returns:
      null, not implemented
    • removeAll

      public void removeAll()
      Remove all ILoopables
    • start

      public void start()
      Start next ILoopable
    • stop

      public void stop()
      Stop every ILoopable
    • process

      public void process()
      Process the currently active ILoopable Call this every loop
    • iterated

      public boolean iterated()
      Returns:
      true if we've just iterated to the next ILoopable
    • onStart

      public void onStart()
      Start next ILoopable
      Specified by:
      onStart in interface ILoopable
    • onLoop

      public void onLoop()
      Process currently active ILoopable
      Specified by:
      onLoop in interface ILoopable
    • isDone

      public boolean isDone()
      Specified by:
      isDone in interface ILoopable
      Returns:
      true when no longer running
    • onStop

      public void onStop()
      Stop all ILoopables
      Specified by:
      onStop in interface ILoopable