Class LambdaStep

java.lang.Object
org.wildstang.framework.auto.AutoStep
org.wildstang.framework.auto.steps.LambdaStep

public class LambdaStep extends AutoStep
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Returns an AutoStep which runs a lambda function and then ends within the same cycle Used to create AutoSteps which only need to call a function of a subsystem without writing a new class Can be static fields of that subsystem
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called once, when the step is first run.
    Returns the name of the AutoStep, used to uniquely identify the step.
    void
    This method is called on the active step, once per call to RobotTemplate.autonomousPeriodic().

    Methods inherited from class org.wildstang.framework.auto.AutoStep

    isFinished, setFinished, setFinished

    Methods inherited from class java.lang.Object

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

    • LambdaStep

      public LambdaStep(LambdaStep.Procedure function, String name)
      Returns an AutoStep which runs a lambda function and then ends within the same cycle Used to create AutoSteps which only need to call a function of a subsystem without writing a new class Can be static fields of that subsystem
      Parameters:
      function - Lambda function to run
      name - Name of the step published on Smart Dashboard
  • Method Details

    • initialize

      public void initialize()
      Description copied from class: AutoStep
      This method is called once, when the step is first run. Use this method to set up anything that is necessary for the step.
      Specified by:
      initialize in class AutoStep
    • update

      public void update()
      Description copied from class: AutoStep
      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.
      Specified by:
      update in class AutoStep
    • toString

      public String toString()
      Description copied from class: AutoStep
      Returns the name of the AutoStep, used to uniquely identify the step.
      Specified by:
      toString in class AutoStep
      Returns:
      Name of the AutoStep.