|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Camera using IterativeRobot class
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.
|
|
#2
|
|||
|
|||
|
Re: Camera using IterativeRobot class
I think I have an answer to my own question if anyone is interested. The line
AxisCamera &camera = AxisCamera::getInstance can be put into a function and called repeatedly. The first time it's called it creates a pointer to the camera object and starts the camera app. After that it just returns the same pointer. Seems to works okay. |
|
#3
|
||||
|
||||
|
Re: Camera using IterativeRobot class
Quote:
Code:
AxisCamera * camera; Code:
camera = &(AxisCamera::GetInstance()); Code above is from memory, so it may not work if you cut/paste, but hopefully it will help! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem using the camera. | Teh1337Bix | Programming | 14 | 01-21-2010 07:52 PM |
| Is anyone using the Camera? | GillSt.Bernards | General Forum | 19 | 03-05-2009 09:52 PM |
| IterativeRobot Race Condition | Dave Scheck | C/C++ | 1 | 02-14-2009 10:55 PM |
| using servos with camera | team877 | Programming | 2 | 02-01-2007 09:26 PM |
| Using camera PWM out | Cuog | Programming | 2 | 11-28-2005 02:17 PM |