View Single Post
  #2   Spotlight this post!  
Unread 21-01-2017, 16:14
dmelcer9 dmelcer9 is offline
Registered User
AKA: Daniel
FRC #0810 (Mechanical Bulls)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Smithtown
Posts: 51
dmelcer9 is an unknown quantity at this point
Re: Building a dedicated GRIP Thread

You need to use VisionThread. The code to do this would look something like this:

Code:
UsbCamera camera = CameraServer.getInstance().startAutomaticCapture(...);
VisionThread vthread = new VisionThread(camera,new GeneratedGripPipeline(), new VisionListener());
vthread.start();
Of course, the VisionListener can be replaced by a Lambda if that is your style. If you already have a VisionRunner object set up, it would simply be
Code:
VisionThread vthread = new VisionThread(visionrunner);
vthread.start();
Reply With Quote