package org.firstinspires.ftc.teamcode;

import com.qualcomm.robotcore.eventloop.opmode.OpMode;

public abstract class OpModeWithAPI extends OpMode {
    protected API api;
    protected GameMotors motors;

    public void construct() {
        api = new API(this);
        motors = new GameMotors(api);
    }

    public void construct(boolean useLogFile) {
        api = new API(this, useLogFile);
        motors = new GameMotors(api);
    }

    public void stop() {
        if (api.useLogFile)
            api.thr.isRunning = false;
    }
}