View Single Post
  #3   Spotlight this post!  
Unread 16-01-2017, 06:03
YairZiv's Avatar
YairZiv YairZiv is offline
Registered User
FRC #5951 (Makers Assemble)
Team Role: Programmer
 
Join Date: Oct 2016
Rookie Year: 2016
Location: Tel Aviv, Israel
Posts: 41
YairZiv is an unknown quantity at this point
Re: VisionThread Listener?

Quote:
Originally Posted by SamCarlberg View Post
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)
This gives me an error saying: "The constructor VisionThread(CameraServer, VisionImplementation(A class I've created that extends VisionPipeline), () -> {}) is not defined.". What am I doing wrong?
Reply With Quote