Chief Pride,
I can see two small problems with your code, both of which are very easy to fix. The first:
Quote:
Originally Posted by Chief Pride
Code:
CameraThread("camera_thread", imageProcessThread())
|
When you pass a function as an argument, you don't use parenthesis after the thread - parenthesis indicate a function
call, not the function itself. So it should be just
Code:
CameraThread("camera_thread", imageProcessThread)
Secondly, your task function (imageProcessThread) must be declared
outside any class definition. So move it after the class ends and before START_ROBOT_CLASS.
You may also have to put a "prototype" of your function before your class definition to make the compiler happy, like so:
Code:
int imageProcessThread(...); /* prototype */
class Robot : public SimpleRobot {
// ...
};
int imageProcessThread(...)
{
return 1;
}
START_ROBOT_CLASS(SimpleRobot);
Good luck and let me know if you have any more trouble.
