Skip to main content

Overview

An extension of the LinearOpMode class that adds a few extra utility features, namely:

  • A global mTelemetry, a Telemetry object which logs to both the driver station and FTCDashboard

  • A global hwMap (hardwareMap, but shorter name)

  • Broadcasts a message (BlackOp.STARTING_MSG) when the runOpMode method is called with Scheduler.emit

  • More will come soon as I think of new, helpful utilities

Usage

It's just like using LinearOpMode, just a couple minor differences:

@TeleOp
public class MyOpMode extends BlackOp { // BlackOp instead of LinearOpMode
@CreateOnGo // Can use @CreateOnGo to automatically
private MyMotor myMotor; // create objects when go() is called

@Override
public void go() { // go() instead of runOpMode()
Scheduler.launchOnStart(this) {
mTelemetry().addData("Hello", "World!"); // Logs to both driver station and FTCDashboard
}
}
}

class Teast {
static {
Scheduler.on(BlackOp.STARTING_MSG, () -> {
// This will fire once when the op mode is started

// Also, you can globally access a hwMap and an mTelemetry
BlackOp.hwMap()
BlackOp.mTelemetry().addLine("Hi!")
});
}
}