Quote:
Originally Posted by DjScribbles
Be sure you are calling AxisCamera::GetInstance each time you go through the function it's used in (as apposed to getting the pointer to it and saving it in a attribute during init), because the CRIO boots faster than the camera, and (I believe) you need to call the get instance after the camera is booted (green lights).
|
Are you sure about this? According to the source code of AxisCamera.cpp, GetInstance will just instantiate the AxisCamera class if it's not already done so. And the constructor of AxisCamera is just creating a semaphore, creating a camera task and starting it. The camera task is a forever loop reading images from the camera. If the camera is not ready, it will sleep for 1 second before trying again. Regardless of whether the camera is ready or not, GetInstance() will give you a pointer to the camera object. So I don't see why I cannot save the camera pointer instead of having to call GetInstance() over and over again.