Package ca.team3161.lib.robot.subsystem
Class OneShotIndependentSubsystem
- java.lang.Object
-
- ca.team3161.lib.robot.subsystem.AbstractSubsystem
-
- ca.team3161.lib.robot.subsystem.AbstractIndependentSubsystem
-
- ca.team3161.lib.robot.subsystem.OneShotIndependentSubsystem
-
- All Implemented Interfaces:
Subsystem
public abstract class OneShotIndependentSubsystem extends AbstractIndependentSubsystem
A Subsystem whose task is only normally run once. The task can however be manually forced to run again by calling {OneshotSubsystem#start} again.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
AbstractSubsystem.RunTask
-
-
Field Summary
-
Fields inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
job, resourceLocks, THREAD_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description OneShotIndependentSubsystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDone()Check if this subsystem's task has been completed.voidstart()Start (or restart) this Subsystem's background task.-
Methods inherited from class ca.team3161.lib.robot.subsystem.AbstractIndependentSubsystem
getExecutorService
-
Methods inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
acquireResources, cancel, getJob, isCancelled, isScheduled, isStarted, releaseResources, require
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.team3161.lib.robot.subsystem.Subsystem
defineResources, task
-
-
-
-
Method Detail
-
start
public void start()
Start (or restart) this Subsystem's background task.
-
isDone
public boolean isDone()
Check if this subsystem's task has been completed. This is never true for repeating subsystems, which are always "Not Started", "Scheduled", or "Cancelled".- Returns:
- true iff completed.
-
-