Unofficial API for the Limelight.
Add compile 'com.2train395.limelight.api:limelight-api:1.0.0'
to your Gradle dependencies.
Make sure mavenCentral()
is added as a repository.
If you'd like to build the API yourself from the most recent commit (not recommended), then run:
git clone https://github.com/Team395/limelight-api.git
cd limelight-api
./gradlew build
The resulting jars can be found in build/libs
. Assuming you have a Gradle project with the same parent directory as the cloned repository, add the following dependency:
compile files('../limelight-api/build/libs/limelight-api-1.0.0.jar')
Adjust the path as necessary if your project is elsewhere.
The Limelight
class provides static methods to access all data posted to NetworkTables by Limelight.
To access the target found with the current pipeline:
if (Limelight.hasTarget()) {
Target target = Limelight.getTarget();
// Do stuff with the target
}