Class AutoManager

java.lang.Object
org.wildstang.framework.auto.AutoManager

public class AutoManager extends Object
Manages all autonomous and AutoPrograms for the framework. Note: This manager previously tracked an AutoStartPosition Enum which was used to compare the current position to where the robot started autonomous. Due to a lack of use this was removed.
  • Constructor Details

    • AutoManager

      public AutoManager()
      Loads in AutoPrograms and adds selectors to the SmartDashboard.
  • Method Details

    • update

      public void update()
      Updates the running AutoProgram and detects if it is finished.
    • preloadLockedProgram

      public void preloadLockedProgram()
      Preloads the currently selected program from SmartDashboard if locked in.
    • startCurrentProgram

      public void startCurrentProgram()
      Starts the currently selected program from SmartDashboard if locked in.
    • startSleeper

      public void startSleeper()
      Starts the default program, Sleeper, which does nothing and never ends.
    • init

      public void init()
      Resets the current program and all states.
    • getRunningProgram

      public AutoProgram getRunningProgram()
      Returns the current running AutoProgram, if one is running.
      Returns:
      The current running program, or null.
    • getRunningProgramName

      public String getRunningProgramName()
      Returns the name of the current running AutoProgram, if one is running.
      Returns:
      The name of the running program, or an empty String.
    • addProgram

      public void addProgram(AutoProgram program)
      Adds a new program to AutoManager and SmartDashboard chooser.
      Parameters:
      program - New AutoProgram to add.
    • endPeriod

      public void endPeriod()
      Ends the autonomous period, prevents it from continuing into tele.
    • isAutoLocked

      public boolean isAutoLocked()