From 083a94b9cd7eb947c3a469d4417bb8151697647f Mon Sep 17 00:00:00 2001 From: Owen McKenna <73701696+owenpmckenna@users.noreply.github.com> Date: Wed, 23 Sep 2026 02:46:42 +0000 Subject: [PATCH 1/2] Add Blaze Hook --- src/content/docs/robot/nextopmode.mdx | 61 ++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/src/content/docs/robot/nextopmode.mdx b/src/content/docs/robot/nextopmode.mdx index 140a28f..262d231 100644 --- a/src/content/docs/robot/nextopmode.mdx +++ b/src/content/docs/robot/nextopmode.mdx @@ -23,12 +23,15 @@ All four are plain fields on the class, so use them directly. Every one of these is optional. Override the ones you need: -| Method | Called | -| -------------------- | ------------------------------------------------ | -| `disabledPeriodic()` | Repeatedly, while the Driver Station is in INIT. | -| `start()` | Once, right after the PLAY button is pressed. | -| `periodic()` | Repeatedly, while the OpMode is running. | -| `end()` | Once, when the OpMode finishes. | +| Method | Called | +| -------------------------- | ------------------------------------------------------ | +| `disabledPeriodic()` | Repeatedly, while the Driver Station is in INIT. | +| `start()` | Once, right after the PLAY button is pressed. | +| `periodic()` | Repeatedly, while the OpMode is running. | +| `end()` | Once, when the OpMode finishes. | +| `onControlHubBulkData()` | Repeatedly, when the BlazeBulkReadHook produces data. | +| `onExpansionHubBulkData()` | Repeatedly, when the BlazeBulkReadHook produces data. | +| `onLocalizationData()` | Work in progress. | @@ -110,6 +113,52 @@ public class MyTeleop extends NextOpMode { +## `BlazeBulkReadHook` + +Using the BlazeFTC library, you may run your code much faster than is typically possible. +Blaze runs in the background, "behind" the SDK and polls data without any user input at all. +On the Control Hub or on a USB Expansion Hub, a slow mode Bulk Read hook can easily provide data at 500 hz. +For more information on how that works, or to accelerate i2c calls, check out the [BlazeFTC Readme](https://github.com/owenpmckenna/blaze_ftc). +To take advantage of Blaze via NextFTC, use the following setup: + + + + +```kotlin +@NextTeleop(name = "My Teleop") +@BlazeEnabled +class MyTeleop(robot: MyRobot) : NextOpMode(robot, BlazeBulkReadHook(Type.EXPANSION_HUB, false)) { + override fun periodic() { + Telemetry.log("Status", "Running") + } + override fun onExpansionHubBulkData() { + //Run PID loops here + } +} +``` + + + + +```java +@NextTeleop(name = "My Teleop") +@BlazeEnabled +public class MyTeleop extends NextOpMode { + public MyTeleop(MyRobot robot) { super(robot, new BlazeBulkReadHook(Type.EXPANSION_HUB, false)); } + @Override + public void periodic() { + Telemetry.log("Status", "Running"); + } + @Override + public void onExpansionHubBulkData() { + //Run PID loops here + } +} +``` + + + + ## Registering with the Driver Station Annotate your class with `@NextTeleop`, `@NextAutonomous`, or `@NextUtility` to make it From 52b4c911d74eda29916f72dee556169559f20488 Mon Sep 17 00:00:00 2001 From: Owen McKenna <73701696+owenpmckenna@users.noreply.github.com> Date: Wed, 23 Sep 2026 02:54:15 +0000 Subject: [PATCH 2/2] BlazeFTC dependency instructions Added Blaze FTC dependency and updated installation instructions. --- src/content/docs/introduction/installation.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content/docs/introduction/installation.mdx b/src/content/docs/introduction/installation.mdx index 07dc05b..822663a 100644 --- a/src/content/docs/introduction/installation.mdx +++ b/src/content/docs/introduction/installation.mdx @@ -23,6 +23,7 @@ and add the following to your `dependencies` block: implementation 'dev.nextftc.v2:control:VERSION' implementation 'dev.nextftc.v2:hardware:VERSION' implementation 'dev.nextftc.v2:robot:VERSION' +implementation 'dev.anygeneric:blazeftc:BLAZE_VERSION' ``` Note that the control and hardware modules can be used on their own. @@ -43,4 +45,7 @@ add the following to the `repositories` block to allow Gradle to find the necess maven { url 'https://repo.dairy.foundation/releases' } +maven { + url 'https://maven.anygeneric.dev/' +} ```