View Single Post
  #3   Spotlight this post!  
Unread 23-01-2014, 09:41
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Axis Camera Exception: No Image Available

Quote:
Originally Posted by notmattlythgoe View Post
Once you get the instance of the camera it takes a few seconds to actually complete the connection, so for about 5-7 seconds after getting the instance no images will be available. Try getting the instance of the camera in robotInit and accessing it from there. We ran into this problem on Tuesday and that fixed it for us.
This is also what we experienced. When you see something like "ClassName.getInstance()", it's an example of the Singleton Pattern. The first time it is called, the object is constructed, so it takes a little bit of time (see the Lazy Initialization section of the link). calling getInstance() later should be pretty quick, though.
Reply With Quote