Skip to content
The CoreControl Hero Image The CoreControl Hero Image

Bring the change now.

The modern way to control your FIRST Tech Challenge robot. Because you should write algorithms. Not boilerplate.

Add those lines to your TeamCode/build.gradle file, and then start using CoreControl in your code!

Register once

This will register CoreControl as a dependency.

TeamCode/build.gradle
apply from: '../build.common.gradle'
apply from: '../build.dependencies.gradle'
android {
namespace = 'org.firstinspires.ftc.teamcode'
packagingOptions {
jniLibs.useLegacyPackaging true
}
}
repositories {
maven {
url "https://remote.corecontrollib.com"
}
}
dependencies {
implementation project(':FtcRobotController')
implementation 'com.andreidurlea:corecontrol:1.1.0.1'
}

Complex logic, made simple

Not just commands. Reusable pieces of code with nesting, virtual multi-threading and looptime budgeting support.

SequentialCommandGroup collectAndLoad
= sequentially(
Spindexer.INSTANCE.reset,
wait(500),
racing(
Intake.INSTANCE.absorb,
waitUntil(() -> Intake.INSTANCE.isFull())
),
Spindexer.INSTANCE.loadToOuttake
);
SequentialCommandGroup shootAndReload
= sequentially(
Outtake.INSTANCE.shoot,
Spindexer.INSTANCE.loadToOuttake
);

Autonomous made easy

Write your autonomous routines as commands, and run them with just a single line of code.

package org.firstinspires.ftc.teamcode;
import ...
public class RedAuto extends CoreAuto {
public MyOpMode() {
super(
// Step 1: Register auto modules
modulesArrayOf(
Intake.INSTANCE,
Chassis.INSTANCE,
Spindexer.INSTANCE,
Outtake.INSTANCE
),
// Step 2: Pass a command to run at init
initCommand,
// Step 3: And another to run when played
redAutoCommand,
);
}
// Done! You have your auto!
}

Use everywhere

You can start using CoreControl in your OpModes by extending CoreTeleOp, in which you can register modules and commands.

MyOpMode.java
package org.firstinspires.ftc.teamcode;
import ...
public class MyOpMode extends CoreTeleOp {
public MyOpMode() {
super(
// Register your own modules!
Intake.INSTANCE,
Chassis.INSTANCE,
Spindexer.INSTANCE,
Outtake.INSTANCE,
true // display automatic telemetry
// about them!
);
}
// Smart buttons!
Button collect
= new Button( () -> gamepad1.square );
Button shoot
= new Button( () -> gamepad1.circle );
// Modules are already initialized automatically!
@Override public void onInit() {
Outtake.INSTANCE.goToHome.register();
}
// Modules' loop logic is run automatically!
@Override public void onMainLoop() {
if (collect.wasPressed() && shoot.isNotHeld())
collectAndLoad.register();
if (shoot.wasPressed())
if (shoot.wasDoublePressed())
shootAndReload.repeat(3).register();
else
shootAndReload.register();
}
}

Unit-testing trivialized

Write unit tests for your modules with minimal boilerplate. Bind commands to buttons, and get a fully functional test OpMode in 30 seconds and 10 or so lines of code.

package org.firstinspires.ftc.teamcode;
import ...
public class IntakeTest extends TestOpMode {
public MyOpMode() {
super(Intake.INSTANCE);
// Just one module to get unit-tested!
}
ActionButton testAbsorb
= new ActionButton(
() -> gamepad1.cross,
Intake.INSTANCE.absorb,
ButtonState.WHEN_PRESSED
);
ActionButton testEject
= new ActionButton(
() -> gamepad1.circle,
Intake.INSTANCE.eject,
ButtonState.WHEN_PRESSED
);
// Those buttons automatically register
// commands when pressed!
}

From zero to working in less than an hour.

Skip the boilerplate. With CoreControl, you can code a fully functional robot from scratch in record time.

Check out the Docs