1
0
Fork
You've already forked ecrl
0
The Enka-Candler Robotics Language
  • Crystal 99.3%
  • Just 0.7%
2026年07月06日 22:50:35 +02:00
.github/workflows Add CI workflow and expand README with setup and syntax docs. 2026年07月06日 16:09:31 -04:00
examples Rename gpad to gpad1 and add dual driver arm example. 2026年07月06日 16:45:08 -04:00
spec Rename gpad to gpad1 and add dual driver arm example. 2026年07月06日 16:45:08 -04:00
src Rename gpad to gpad1 and add dual driver arm example. 2026年07月06日 16:45:08 -04:00
.editorconfig Refactor the compiler for maintainability and add a test suite. 2026年07月06日 16:04:10 -04:00
.gitignore chore: create a justfile 2026年06月24日 13:20:09 -04:00
justfile Refactor the compiler for maintainability and add a test suite. 2026年07月06日 16:04:10 -04:00
LICENSE chore: initial language commit 2026年06月24日 10:10:21 -04:00
README.md Rename gpad to gpad1 and add dual driver arm example. 2026年07月06日 16:45:08 -04:00
shard.yml Refactor the compiler for maintainability and add a test suite. 2026年07月06日 16:04:10 -04:00

Enka-Candler Robotics Language

The Enka-Candler Robotics Language (ECRL, pronounced eck-ruhl) is a language that compiles to Java and the FTC SDK. Because it compiles to the FTC SDK, this language is meant for FTC teams.

Official Locations

These are official locations of ECRL. It is recommended to only get ECRL from these locations.

Getting Started

Prerequisites

  • Crystal 1.0 or newer
  • just (optional, but recommended)

Build the compiler

just build

This produces the ecrl binary at bin/ecrl.

Compile an ECRL program

just run path/to/program.ecr

This writes Java output to path/to/program.ecr.java. You can also invoke the compiler directly:

./bin/ecrl -s path/to/program.ecr -o path/to/output.java
./bin/ecrl -s path/to/program.ecr -o path/to/output.java -p com.myteam.teleop

The -p / --package flag overrides any package directive in the source file.

Run tests

just test

Language Overview

An ECRL program has three main sections:

package "org.firstinspires.ftc.teamcode.teleop"
module "MyRobot"
define {
 drivetrain {
 fl: "leftFront" FORWARD
 fr: "rightFront" REVERSE
 bl: "leftBack" FORWARD
 br: "rightBack" FORWARD
 }
 var speed = 1.0
 dc "intake"
 servo "wrist"
}
teleop "Drive Mode" group "Main" {
 loop {
 drive(gpad1.left_stick_y, gpad1.left_stick_x, gpad1.right_stick_x)
 if gpad1.square && gpad2.triangle {
 robot.intake.set_power(speed)
 } else if gpad1.right_trigger >= 0.5 {
 robot.intake.stop()
 }
 robot.wrist.set_position(0.5)
 robot.tel.show("Speed", "Target: #{speed}")
 robot.tel.update()
 }
}
  • ! starts a line comment
  • package sets the generated Java package (default: org.firstinspires.ftc.teamcode.teleop)
  • module sets the generated Java class name
  • define declares hardware, variables, and the mecanum drivetrain
  • teleop defines the FTC @TeleOp name, group, and main loop
  • gpad1.* maps to gamepad1.*; gpad2.* maps to gamepad2.*
  • dc declares motors; servo declares servos
  • if supports comparisons (>, <, >=, <=, ==, !=), &&, and ||
  • robot.<device>.set_power/set_velocity/stop controls motors; set_position controls servos
  • robot.tel.show/update handles telemetry

Examples

Compile an example with:

just buildrun examples/dual_driver_arm.ecr

Or the Limelight example:

just buildrun examples/limelightrobotics_2025remake.ecr

Contributing

ECRL is open to contributions! To contribute, follow these steps:

  1. Fork the repository here: https://codeberg.org/zanderlewis/ecrl
  2. Create a new branch: git switch -c my-awesome-new-feature
  3. Make your changes and run just test
  4. Commit and submit a pull request describing your changes