View Single Post
  #2   Spotlight this post!  
Unread 04-04-2012, 15:30
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Declaring the AxisCamera as a module level variable.

As a member variable to your SimpleRobot class, define AxisCamera& camera; Then in the initializers, initialize it there. For instance...

Code:
#define CAMERA_IP "10.19.67.11"

class RobotDemo : public SimpleRobot
{
  AxisCamera& camera;
  Joystick driver;    // driving Joystick for driver
public:
  RobotDemo(void) :
	driver(1),
	camera(AxisCamera::GetInstance(CAMERA_IP))
  {
	// Robot constructor
  }

// ....
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote