Friday, 9 May 2014

Study the first program

__EXPORT int px4_simple_app_main(int argc, char *argv[]);
__EXPORT can be found in visibility.h
#ifdef __EXPORT
#  undef __EXPORT
#endif
#define __EXPORT __attribute__ ((visibility ("default")))
"The keyword __attribute__ allows you to specify special attributes when making a declaration. This keyword is followed by an attribute specification inside double parentheses. "

int sensor_sub_fd = orb_subscribe(ORB_ID(sensor_combined));

sensor_combined is a structure, containing "Sensor readings in raw and SI-unit form";


ORB_ID Generates a pointer to the uORB metadata structure for a given topic. The topic must have been declared previously in scope with ORB_DECLARE().