AP_HAL: move definition of callbacks structure out of C linkage
This fixes all the examples which use the AP_HAL_MAIN macro.
This commit is contained in:
parent
4a10156b13
commit
e83b10cbc5
@ -37,10 +37,11 @@
|
||||
|
||||
#else
|
||||
|
||||
#define AP_HAL_MAIN() extern "C" { \
|
||||
#define AP_HAL_MAIN() \
|
||||
AP_HAL::HAL::FunCallbacks callbacks(setup, loop); \
|
||||
extern "C" { \
|
||||
int AP_MAIN(int argc, char* const argv[]); \
|
||||
int AP_MAIN(int argc, char* const argv[]) { \
|
||||
AP_HAL::HAL::FunCallbacks callbacks(setup, loop); \
|
||||
hal.run(argc, argv, &callbacks); \
|
||||
return 0; \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user