BlazeOpMode

abstract class BlazeOpMode(robot: NextRobot, hooks: OpModeHook) : NextOpMode

Base class for NextFTC OpModes that run with Blaze enabled.

Extending this class instead of NextOpMode routes motor writes through Blaze for the whole OpMode and exposes callbacks for data Blaze provides.

Parameters

robot

The automatically resolved dev.nextftc.robot.NextRobot instance.

hooks

Additional custom hooks to execute during the OpMode lifecycle.

Constructors

Link copied to clipboard
constructor(robot: NextRobot, vararg hooks: OpModeHook)

Properties

Link copied to clipboard
val gamepad1: Gamepad

The primary gamepad provided by the Driver Station.

Link copied to clipboard
val gamepad2: Gamepad

The secondary gamepad provided by the Driver Station.

Link copied to clipboard
val hardwareMap: HardwareMap

The hardware map provided by the FTC SDK.

Link copied to clipboard
val telemetry: Telemetry

The standard SDK telemetry provided by the Driver Station.

Functions

Link copied to clipboard
open fun disabledPeriodic()

Called repeatedly while the OpMode is in the INIT phase.

Link copied to clipboard
open fun end()

Called exactly once when the OpMode finishes execution.

Link copied to clipboard

Run when Blaze provides new Control Hub Bulk Data. Requires a BlazeBulkReadHook.

Link copied to clipboard

Run when Blaze provides new Expansion Hub Bulk Data. Requires a BlazeBulkReadHook.

Link copied to clipboard

Run when Blaze provides new localization data

Link copied to clipboard
open fun periodic()

Called repeatedly while the OpMode is actively running.

Link copied to clipboard
open fun start()

Called exactly once after the PLAY button is pressed.