Package org.team1540.rooster.wrappers
Class Limelight
- java.lang.Object
-
- org.team1540.rooster.wrappers.Limelight
-
public class Limelight extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.commons.math3.geometry.euclidean.twod.Vector2D>getCorners()doublegetHorizontalFov()booleangetLeds()edu.wpi.first.networktables.NetworkTablegetNetworkTable()longgetPipeline()org.apache.commons.math3.geometry.euclidean.twod.Vector2DgetResolution()org.apache.commons.math3.geometry.euclidean.twod.Vector2DgetTargetAngles()Gets the output of the limelight targeting from the network table.doublegetVerticalFov()booleanisTargetFound()Queries whether the limelight target has been found.voidsetDriverCam(boolean driverCam)Sets limelight to driver cam or vision mode.voidsetLeds(boolean isOn)Sets limelight's green LEDs on or off.voidsetPipeline(double id)
-
-
-
Constructor Detail
-
Limelight
public Limelight(String name)
Constructs a new limelight interface with the default hostname.- Parameters:
name- hostname of the limelight
-
-
Method Detail
-
getNetworkTable
public edu.wpi.first.networktables.NetworkTable getNetworkTable()
-
getHorizontalFov
public double getHorizontalFov()
-
getVerticalFov
public double getVerticalFov()
-
getResolution
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getResolution()
-
getTargetAngles
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getTargetAngles()
Gets the output of the limelight targeting from the network table.- Returns:
- a
Vector2Dcontaining the output angles of the limelight targeting in radians
-
isTargetFound
public boolean isTargetFound()
Queries whether the limelight target has been found.- Returns:
- the state of the target
-
setLeds
public void setLeds(boolean isOn)
Sets limelight's green LEDs on or off.- Parameters:
isOn- the new state of the LEDs
-
getLeds
public boolean getLeds()
-
setDriverCam
public void setDriverCam(boolean driverCam)
Sets limelight to driver cam or vision mode.- Parameters:
driverCam- Whether the limelight should be in driver cam mode
-
setPipeline
public void setPipeline(double id)
-
getPipeline
public long getPipeline()
-
getCorners
public List<org.apache.commons.math3.geometry.euclidean.twod.Vector2D> getCorners()
-
-