Package frc.robot.shared.commands
Class AbstractSubsystemCommandFactory<TSubsystem extends AbstractSubsystem<?>>
java.lang.Object
frc.robot.shared.commands.AbstractSubsystemCommandFactory<TSubsystem>
- Type Parameters:
TSubsystem- subsystem type that commands will operate on
- Direct Known Subclasses:
AbstractSetAndSeekCommandFactory,AbstractVelocityCommandFactory,DriveBaseSubsystemCommandFactory,GameplayStateCommandFactory
public abstract class AbstractSubsystemCommandFactory<TSubsystem extends AbstractSubsystem<?>>
extends Object
Base factory for building commands tied to a single subsystem instance.
Extend this in each subsystem package to keep command creation centralized.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TSubsystemSubsystem instance shared by all commands created by this factory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSubsystemCommandFactory(TSubsystem subsystem) Creates a command factory bound to the given subsystem so derived commands can share it. -
Method Summary
Modifier and TypeMethodDescriptionExposes the shared subsystem instance so callers can apply configuration or tuning hooks.
-
Field Details
-
subsystem
Subsystem instance shared by all commands created by this factory.
-
-
Constructor Details
-
AbstractSubsystemCommandFactory
Creates a command factory bound to the given subsystem so derived commands can share it. Call from subsystem-specific factory constructors when wiring commands.- Parameters:
subsystem- the subsystem instance that commands produced by this factory will operate on
-
-
Method Details
-
getSubsystem
Exposes the shared subsystem instance so callers can apply configuration or tuning hooks.- Returns:
- subsystem that generated commands will operate on
-