EasyStack Docs

EasySubsystem

#EasySubsystem

EasySubsystem is the interface behind every subsystem. It has one method you must write and two that have a default.

MethodDescription
void init(HardwareMap hardwareMap)Required. Get the motors, servos and sensors of the mechanism from the hardware map here.
default void loop()Optional. Work that must happen on every loop cycle, such as reading a sensor or applying a controller output. It does nothing by default.
default String getName()The name of the subsystem. It returns the simple class name by default, so Arm returns "Arm". Override it to use another name.

A minimal subsystem looks like this:

Java
public class Intake extends EasySubsystemBase {

    private DcMotorEx motor;

    @Override
    public void init(HardwareMap hardwareMap) {
        motor = hardwareMap.get(DcMotorEx.class, "intake");
    }

    public void setPower(double power) {
        motor.setPower(power);
    }
}

A class that only implements EasySubsystem does not show up in the dashboard automatically. Extend EasySubsystemBase, or call EasyDash.subsystem(this) yourself. The scheduler itself does not need subsystems to be registered.

init() and loop() are called for you when the subsystem is added to an EasySubsystemComponent in an EasyOpMode. In a plain OpMode, call them yourself.

Last updated 2026-11-16

EasyStack - FTC Java library

This site records page views of visitors to understand how the documentation is used. Nothing is sold or shared with third parties.