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()
double
getHorizontalFov()
boolean
getLeds()
edu.wpi.first.networktables.NetworkTable
getNetworkTable()
long
getPipeline()
org.apache.commons.math3.geometry.euclidean.twod.Vector2D
getResolution()
org.apache.commons.math3.geometry.euclidean.twod.Vector2D
getTargetAngles()
Gets the output of the limelight targeting from the network table.double
getVerticalFov()
boolean
isTargetFound()
Queries whether the limelight target has been found.void
setDriverCam(boolean driverCam)
Sets limelight to driver cam or vision mode.void
setLeds(boolean isOn)
Sets limelight's green LEDs on or off.void
setPipeline(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
Vector2D
containing 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()
-
-