Package org.wildstang.framework.auto
Class AutoManager
java.lang.Object
org.wildstang.framework.auto.AutoManager
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 Summary
ConstructorsConstructorDescriptionLoads in AutoPrograms and adds selectors to the SmartDashboard. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProgram(AutoProgram program) Adds a new program to AutoManager and SmartDashboard chooser.voidEnds the autonomous period, prevents it from continuing into tele.Returns the current running AutoProgram, if one is running.Returns the name of the current running AutoProgram, if one is running.voidinit()Resets the current program and all states.booleanvoidPreloads the currently selected program from SmartDashboard if locked in.voidStarts the currently selected program from SmartDashboard if locked in.voidStarts the default program, Sleeper, which does nothing and never ends.voidupdate()Updates the running AutoProgram and detects if it is finished.
-
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
Returns the current running AutoProgram, if one is running.- Returns:
- The current running program, or null.
-
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
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()
-