Subsystems
Esta página aún no está traducida. Se muestra la versión en inglés.
A subsystem is one mechanism of the robot, such as an arm, an intake or a drivetrain. In command-based code, commands use the subsystem to move the mechanism, and the scheduler makes sure only one command controls it at a time.
EasyStack provides three types for writing subsystems:
| Type | Kind | Purpose |
|---|---|---|
EasySubsystem | Interface | Defines what every subsystem has: init(), loop() and getName(). |
EasySubsystemBase | Abstract class | Registers the subsystem with the dashboard and adds a default command, the current command and ready-made command factories. |
EasyStateSubsystem<S> | Abstract class | Extends EasySubsystemBase with a current state, chosen from an enum. |
For most mechanisms, extend EasySubsystemBase. If the mechanism has a few named positions or modes, such as an arm that is stowed, at the intake or at the scoring position, extend EasyStateSubsystem instead.
The package name is spelled subsytem in the source, without the second s. Use the same spelling in imports:
Java
import dev.easyfamily.wintechlib.subsytem.EasySubsystemBase;
import dev.easyfamily.wintechlib.subsytem.EasyStateSubsystem;Última actualización 2026-11-16