Class TargetTracker

  • All Implemented Interfaces:
    edu.wpi.first.wpilibj.Sendable, edu.wpi.first.wpilibj2.command.Subsystem

    public class TargetTracker
    extends edu.wpi.first.wpilibj2.command.SubsystemBase
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enableTargetChecking​(boolean on)
      Should target checking be enabled? When on, the limelight will briefly flash once every second and check for goals.
      static TargetTracker getInstance()  
      LimelightTarget getLastSnapshot()
      Get the latest target checking snapshot
      LimelightTarget getTarget()
      Return the current viewed target, or null if vision is disabled, or there is no target to be found
      void periodic()  
      • Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase

        addChild, getName, getSubsystem, initSendable, setName, setSubsystem
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface edu.wpi.first.wpilibj.Sendable

        addChild, setName, setName, setName
      • Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem

        getCurrentCommand, getDefaultCommand, register, setDefaultCommand
    • Method Detail

      • periodic

        public void periodic()
      • enableTargetChecking

        public void enableTargetChecking​(boolean on)
        Should target checking be enabled? When on, the limelight will briefly flash once every second and check for goals.
        Parameters:
        on - Enable target checking?
      • getLastSnapshot

        public LimelightTarget getLastSnapshot()
        Get the latest target checking snapshot
        Returns:
        Latest snapshot
      • getTarget

        public LimelightTarget getTarget()
        Return the current viewed target, or null if vision is disabled, or there is no target to be found
        Returns:
        Current target