ardupilot/libraries/AP_HAL_SITL/AP_HAL_SITL_Main.h
Caio Marcelo de Oliveira Filho c6292ff097 AP_HAL_SITL: implement HAL::run()
2015-10-21 09:16:07 +11:00

16 lines
365 B
C

#ifndef __AP_HAL_SITL_MAIN_H__
#define __AP_HAL_SITL_MAIN_H__
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#define AP_HAL_MAIN() extern "C" {\
int main (int argc, char * const argv[]) { \
AP_HAL::HAL::FunCallbacks callbacks(setup, loop); \
hal.run(argc, argv, &callbacks); \
return 0; \
}\
}
#endif
#endif // __AP_HAL_SITL_MAIN_H__