Skip to content

A simple library to make cleaner calls to the Limelight.

License

Notifications You must be signed in to change notification settings

physprop/limelight_library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

THE SOURCE CODE HAS MOVED!!

For the latest source code, go here: https://dev.azure.com/gabrielmcmillan/_git/limelight_library The instructions below will still work however.

limelight_library

A simple library to help make cleaner calls to the Limelight.
I know this is in robotcontainer and I am not supposed to do that, but I needed a quick place to put it anyways.

How to use:

  1. In your build.gradle file paste the following: This part goes before the deploy call.
repositories {
   maven {
    url 'https://pkgs.dev.azure.com/gabrielmcmillan/limelight_library/_packaging/limelight_library_maven/maven/v1'
}
}

This part goes under dependancies. Check the artifacts section for the latest version number.

compile(group: 'com.fearxzombie', name: 'limelight_library', version: '0.7')
  1. Build your robot code to pull the dependancies.
  2. In RobotContainer, instantiate limelight as a subsystem by using:
public class RobotContainer {
  // Subsystems
  public static final limelight m_limelight = new limelight();

Make sure you start the library before any depending subsystems/commands start. Not doing so will cause the robot code to go into a restart loop.

  1. Use m_limelight.get**(); or m_limelight.set**(); to get or set NT values.

By default, the hostname used is "limelight", however it can be changed by appending a string to the contructor like so:

public static final limelight m_limelight = new limelight("limelight-one");

Also included is a document where most limelight networktables settings can be called in a more human readable way. Just call it like this:

m_limelight.setLEDMode(ll_mode.led.on);

Legacy installation

In the event that the maven dependancy does not work, simply downloading the zip file from the Azure DevOps page and placing the src/main/java/com/fearxzombie folder into the robot code directory will work the same way. However a pro with maven is that if any updates are pushed, one line change and build of code is all you need to be able to implement new features.

This is an example robot project that uses the LimelightLibrary: https://dev.azure.com/gabrielmcmillan/limelight_library/_git/limelight_library_example