Commit Graph

11 Commits

Author SHA1 Message Date
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Gustavo Jose de Sousa 6d667e19b1 AP_Notify: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:20 +10:00
Andrew Tridgell 24e2e4b35e AP_Notify: convert example from .pde to .cpp 2015-06-01 17:07:05 +10:00
Randy Mackay 240a845206 Notify: fix example sketches 2015-05-01 20:58:34 +09:00
Randy Mackay 775cbfba38 Notify: fix example sketch 2015-01-28 17:15:47 +09:00
Kevin Hester fce1277b0e Notify: fixup line endings 2014-04-15 15:57:11 +09:00
Andrew Tridgell dde18093ed AP_Notify: disable autobuild of example
this fails due to an AVR linker bug
2013-12-10 15:54:35 +11:00
Andrew Tridgell dd081ab23b AP_Notify: enable toshibaled on all I2C capable platforms 2013-09-28 22:04:15 +10:00
Randy Mackay a52b1831ca AP_Notify: make flags static variable 2013-08-30 13:01:35 +10:00
Randy Mackay b1278fa006 AP_Notify: early draft of library 2013-08-30 13:01:34 +10:00