eclipse / mraa

Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.

Home Page:http://mraa.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mraa C++ bindings: printError() needs to be prefixed

mwallnoefer opened this issue · comments

In contradiction to the example here http://iotdk.intel.com/docs/master/mraa/classmraa_1_1_led.html and the others under https://github.com/eclipse/mraa/tree/master/examples/c%2B%2B the printError() function needs to be prefixed with mraa:: -> mraa::printError().

Please fix the examples, thanks a lot!

Moreover the usleep() function had been deprecated for quite a lot of time and should be substituted by nanosleep(). Please find here the respective indication in the Linux manpages:

CONFORMING TO
4.3BSD, POSIX.1-2001. POSIX.1-2001 declares this function obsolete;
use nanosleep(2) instead. POSIX.1-2008 removes the specification of
usleep().

The most easy substitution in the leds example could be:

    /* sleep for 5 seconds */
    ::sleep(5);

Any news on this?