View Single Post
  #2   Spotlight this post!  
Unread 15-01-2017, 22:30
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 154
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: VisionThread Listener?

The listener is more or less a function that gets called every time the pipeline runs. You can write it as a lambda:

Code:
VisionThread visionThread = new VisionThread(usbCamera, myPipeline, () -> {
        // listener code here
    });
Otherwise you just have a class that implements VisionRunner.Listener. The lambda is good because it makes synchronization easier (see this screensteps page)
__________________
WPILib
GRIP, RobotBuilder
Reply With Quote