mraa icon indicating copy to clipboard operation
mraa copied to clipboard

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

Open mwallnoefer opened this issue 4 years ago • 2 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!

mwallnoefer avatar Feb 20 '21 15:02 mwallnoefer

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);

mwallnoefer avatar Feb 20 '21 15:02 mwallnoefer

Any news here?

mwallnoefer avatar Feb 07 '22 15:02 mwallnoefer

Any news on this?

mwallnoefer avatar Jan 29 '24 09:01 mwallnoefer