Commit Graph

13 Commits

Author SHA1 Message Date
Andrew Tridgell 20d762293d AP_HAL: remove more px4 remnants 2019-02-27 20:32:37 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi bbe3a94175 AP_HAL: remove support for main without argc
This was only used by flymaple. Also add missing copyright notice to
header.
2016-05-23 21:49:45 -03:00
Lucas De Marchi 346bdf5f8f AP_HAL: remove support for flymaple 2016-05-23 21:49:45 -03:00
Peter Barker e83b10cbc5 AP_HAL: move definition of callbacks structure out of C linkage
This fixes all the examples which use the AP_HAL_MAIN macro.
2016-04-27 14:21:28 +10:00
Lucas De Marchi dbf2aedf1e AP_HAL: replace header guard with pragma once 2016-02-18 14:52:34 -02:00
Peter Barker f0c165f0e4 AP_HAL: ensure CONFIG_MAIN_WITHOUT_ARGC_ARGV is always defined 2016-01-30 12:48:51 -02:00
Andrew Tridgell bd2f548130 AP_HAL: allow argc and argc on QURT 2015-12-29 18:52:17 +11:00
Andrew Tridgell 7c431b40f2 AP_HAL: enable HAL_QURT 2015-12-27 16:21:25 +11:00
Lucas De Marchi 8e65e88d06 AP_HAL: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
Lucas De Marchi 79dee5aaa9 AP_HAL: fix warning due to missing prototype after HAL rework
This was introduced with the HAL rework:

In file included from /p/ardupilot/libraries/AP_HAL/AP_HAL.h:11:0,
                 from /p/ardupilot/ArduCopter/Copter.h:35,
                 from /p/ardupilot/ArduCopter/ArduCopter.cpp:76:
/p/ardupilot/ArduCopter/ArduCopter.cpp: In function 'int ArduPilot_main(int, char* const*)':
/p/ardupilot/libraries/AP_HAL/AP_HAL_Main.h:11:26: warning: no previous declaration for 'int ArduPilot_main(int, char* const*)' [-Wmissing-declarations]
 #define AP_MAIN __EXPORT ArduPilot_main
                          ^

It's due to PX4 using that warning as opposed to Linux. Since it harmless, add
the prototype for everybody.
2015-10-23 07:47:19 +11:00
Caio Marcelo de Oliveira Filho b29d6eff5d AP_HAL: add an AP_HAL_MAIN_CALLBACKS() macro
This is going to be used by vehicles that already have an object with
setup/loop functions. The vehicle object will just implement the
HAL::Callbacks interface.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho 19b4ca60c4 AP_HAL: provide AP_HAL_MAIN()
Move the macros to a single place and reduce the variations not based on
board, but based on

- The name of the entry-point function, specified by AP_MAIN;
- Whether it contains argc/argv arguments or not.

The goal here is that programs (vehicles and examples) don't need to
include all possible boards to define a main function. Further patches
will change the programs.
2015-10-21 09:16:09 +11:00