Class Limelight2


  • public class Limelight2
    extends java.lang.Object
    • Field Detail

      • users

        public int users
    • Method Detail

      • getInstance

        public static Limelight2 getInstance()
      • use

        public void use​(boolean use)
      • hasTarget

        public boolean hasTarget()
        Does the limelight have a target in sight?
        Returns:
        Has target
      • getTarget

        public LimelightTarget getTarget()
        Get the current target, or null if no target
        Returns:
        Current target
      • getXAngle

        public double getXAngle()
        Get horizontal target angle [from -29.8 t0 29.8 degrees]
        Returns:
        Target angle
      • getYAngle

        public double getYAngle()
        Get horizontal target angle [from -24.85 to 24.85 degrees]
        Returns:
        Target angle
      • getArea

        public double getArea()
        Get target area [0% to 100%]
        Returns:
        Target area
      • getSkew

        public double getSkew()
        Get target skew / rotation [-90 to 0 degrees]
        Returns:
        Target skew
      • setPortrait

        public void setPortrait​(boolean isPortrait)
        Set camera portrait mode
        Parameters:
        isPortrait - Is camera in portrait mode?
      • setLED

        public void setLED​(Limelight2.LEDMode mode)
        Set the limelight LED mode
        Parameters:
        mode - LED mode
      • enableVision

        public void enableVision​(boolean on)
        Switch between vision and driver mode
        Parameters:
        on - Should be vision tracking?
      • setPipeline

        public void setPipeline​(int pipelineID)
        Set vision pipeline ID
        Parameters:
        pipelineID - Pipeline ID
      • setCamMode

        public void setCamMode​(Limelight2.CameraMode mode)
        Set the camera stream mode
        Parameters:
        mode - Stream mode