charmedlabs / pixy

pixy CMUcam5
Other
338 stars 242 forks source link

pixy_init doesn't return a value #12

Closed sharived closed 10 years ago

sharived commented 10 years ago

Hi, I'm trying to run pixy on raspberry pi and unfortunately it doesn't work out of the box for me, so I'm trying to debug it. I see that pixy_init() in pixy.cpp doesn't actually return the return_value which is used in main() in hello_pixy.c: pixy_init_status = pixy_init();

I assume you need to add return return_value; at the end of pixy_init.

I also see that PixyInterpreter::init() also doesn't return a value at the end after the thread creation. Should have a return 0; since it is used by pixy_init: return_value = interpreter.init();

Not sure how this code works as is. Am I missing something?

Thanks, Shari

sharived commented 10 years ago

Thanks for the pixy.cpp fix. I still think you need a return 0;

at the end of PixyInterpreter::init()

johnleimon commented 10 years ago

Shari,

Yes, PixyInterpreter::init() should return a value as well. In this next iteration of development I will focus on error propagation in the API, which has room for improvement.

Thanks for the feedback!

John

On Wed, Sep 3, 2014 at 2:57 PM, Shari Vedovato notifications@github.com wrote:

Thanks for the pixy.cpp fix. I still think you need a return 0;

at the end of PixyInterpreter::init()

— Reply to this email directly or view it on GitHub https://github.com/charmedlabs/pixy/issues/12#issuecomment-54356238.