ardupilot/libraries/AP_HAL_Linux/AP_HAL_Linux_Main.h

19 lines
405 B
C
Raw Normal View History

2013-09-22 03:01:24 -03:00
#ifndef __AP_HAL_LINUX_MAIN_H__
#define __AP_HAL_LINUX_MAIN_H__
2014-07-06 23:03:26 -03:00
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
2013-09-22 03:01:24 -03:00
#define AP_HAL_MAIN() extern "C" {\
int main (int argc, char * const argv[]) { \
hal.init(argc, argv); \
hal.scheduler->system_initialized(); \
2014-07-06 20:00:58 -03:00
setup();\
for(;;) loop();\
2013-09-22 03:01:24 -03:00
return 0;\
}\
}
2014-07-06 23:03:26 -03:00
#endif // HAL_BOARD_LINUX
2013-09-22 03:01:24 -03:00
#endif // __AP_HAL_LINUX_MAIN_H__