Class ArcadeDrivetrain
- java.lang.Object
-
- ca.team3161.lib.robot.subsystem.AbstractSubsystem
-
- ca.team3161.lib.robot.subsystem.AbstractPooledSubsystem
-
- ca.team3161.lib.robot.subsystem.RepeatingPooledSubsystem
-
- ca.team3161.lib.robot.motion.drivetrains.AbstractDrivetrainBase
-
- ca.team3161.lib.robot.motion.drivetrains.ArcadeDrivetrain
-
- All Implemented Interfaces:
LifecycleListener,Subsystem,ComposedComponent<SpeedControllerGroup>
public class ArcadeDrivetrain extends AbstractDrivetrainBase implements ComposedComponent<SpeedControllerGroup>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArcadeDrivetrain.BuilderA Builder for arcade drivetrains.-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineResources()Define the set of resourceLocks required for this Subsystem's task.java.util.Collection<SpeedControllerGroup>getComposedComponents()Get the composed components within this one.voidsetForwardTarget(double forwardTarget)voidsetTurnTarget(double turnTarget)voidstop()Stop all movement by setting all motor target values to 0 and disabling them.voidtask()The background task to run.-
Methods inherited from class ca.team3161.lib.robot.motion.drivetrains.AbstractDrivetrainBase
onLifecycleChange
-
Methods inherited from class ca.team3161.lib.robot.subsystem.RepeatingPooledSubsystem
isDone, start
-
Methods inherited from class ca.team3161.lib.robot.subsystem.AbstractPooledSubsystem
getExecutorService
-
Methods inherited from class ca.team3161.lib.robot.subsystem.AbstractSubsystem
acquireResources, cancel, getJob, isCancelled, isScheduled, isStarted, releaseResources, require
-
-
-
-
Method Detail
-
defineResources
public void defineResources()
Define the set of resourceLocks required for this Subsystem's task.- Specified by:
defineResourcesin interfaceSubsystem- See Also:
AbstractSubsystem.require(Object)
-
setForwardTarget
public void setForwardTarget(double forwardTarget)
-
setTurnTarget
public void setTurnTarget(double turnTarget)
-
stop
public void stop()
Stop all movement by setting all motor target values to 0 and disabling them.- Specified by:
stopin classAbstractDrivetrainBase
-
task
public void task() throws java.lang.ExceptionThe background task to run.
-
getComposedComponents
public java.util.Collection<SpeedControllerGroup> getComposedComponents()
Get the composed components within this one.- Specified by:
getComposedComponentsin interfaceComposedComponent<SpeedControllerGroup>- Returns:
- the composed components.
-
-