Class AutoStep

java.lang.Object
org.wildstang.framework.auto.AutoStep
Direct Known Subclasses:
AutoParallelStepGroup, AutoSerialStepGroup, AutoStepDelay, AutoStepStopAutonomous, PathFollowerStep, PathHeadingStep, SetGyroStep, SwervePathFollowerStep

public abstract class AutoStep extends Object
Represents a single automated robot operation. When it's the step's turn, initialize() is run once, then update() is run until setFinished(true).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Set step to not finished.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    This method is called once, when the step is first run.
    boolean
    Returns if the AutoStep is finished, meaning the next step may begin.
    void
    Completes the set by setting finished to true.
    void
    setFinished(boolean isFinished)
    Do not use this function in new implementations.
    abstract String
    Returns the name of the AutoStep, used to uniquely identify the step.
    abstract void
    This method is called on the active step, once per call to RobotTemplate.autonomousPeriodic().

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AutoStep

      public AutoStep()
      Set step to not finished. Constructing does not start step, rather prepares it for initialization.
  • Method Details

    • initialize

      public abstract void initialize()
      This method is called once, when the step is first run. Use this method to set up anything that is necessary for the step.
    • update

      public abstract void update()
      This method is called on the active step, once per call to RobotTemplate.autonomousPeriodic(). Steps will continue to have this method called until they set finished to true. Note: this method is first called right after initialize(), with no delay in between.
    • isFinished

      public boolean isFinished()
      Returns if the AutoStep is finished, meaning the next step may begin.
      Returns:
      True if the step is finished.
    • setFinished

      public void setFinished(boolean isFinished)
      Do not use this function in new implementations. Previously setFinished took a boolean, but there is not case where setFinished(false) is a valid operation. This exists to allow it to still be called that way.
      Parameters:
      isFinished - Unused, finished is always set to true.
    • setFinished

      public void setFinished()
      Completes the set by setting finished to true.
    • toString

      public abstract String toString()
      Returns the name of the AutoStep, used to uniquely identify the step.
      Overrides:
      toString in class Object
      Returns:
      Name of the AutoStep.