Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   cRIO boots before Camera (http://www.chiefdelphi.com/forums/showthread.php?t=126730)

DDSLoan96 18-02-2014 09:35

cRIO boots before Camera
 
We have been having an issue with the camera where the camera doesnt finish booting until after the cRIO does and it fills our driverstation log with errors because of this. Anything we can do to fix this?

AlexBrinister 03-03-2014 09:58

Re: cRIO boots before Camera
 
Does the camera's slow start affect your robot in any other way?

Alex Brinister

DjScribbles 03-03-2014 12:54

Re: cRIO boots before Camera
 
I'm not 100% sure if this is your exact problem, but in reviewing my 2012 camera code, I noticed that I explicitly avoid getting an instance of the camera (i.e. connecting) in a constructor.

I use the following function to get a pointer to the camera whenever I want to use it:

Code:

AxisCamera *Camera::GetCamera()
{
    static AxisCamera *camera = (AxisCamera *) 0;

    if (camera == (AxisCamera *) 0)
    {
        AxisCamera &camRef = AxisCamera::GetInstance("10.24.74.11");
        camera = &camRef;
    }
    return camera;
}

This way, you don't try to connect to the camera until the first time you use it.


All times are GMT -5. The time now is 10:03.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi