View Single Post
  #3   Spotlight this post!  
Unread 24-01-2010, 21:47
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Camera using IterativeRobot class

Quote:
Originally Posted by Steve Warner View Post
Has anybody converted the 2010 Image Demo from the SimpleRobot class to the IterativeRobot class? How did you define the camera so it's not local to only the function it's defined in and therefore lost between iterations? The AxisCamera class seems to work differently from all the other WPILib classes.
Declare a pointer in your IterativeRobot class:

Code:
AxisCamera * camera;
Then in your IterativeRobot constructor call:

Code:
camera = &(AxisCamera::GetInstance());
Use the dereference arrow -> instead of periods when calling camera methods.

Code above is from memory, so it may not work if you cut/paste, but hopefully it will help!
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote