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 class
ArcadeDrivetrain.Builder
A 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 void
defineResources()
Define the set of resourceLocks required for this Subsystem's task.java.util.Collection<SpeedControllerGroup>
getComposedComponents()
Get the composed components within this one.void
setForwardTarget(double forwardTarget)
void
setTurnTarget(double turnTarget)
void
stop()
Stop all movement by setting all motor target values to 0 and disabling them.void
task()
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:
defineResources
in 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:
stop
in classAbstractDrivetrainBase
-
task
public void task() throws java.lang.Exception
The background task to run.
-
getComposedComponents
public java.util.Collection<SpeedControllerGroup> getComposedComponents()
Get the composed components within this one.- Specified by:
getComposedComponents
in interfaceComposedComponent<SpeedControllerGroup>
- Returns:
- the composed components.
-
-