Commit Graph

6 Commits

Author SHA1 Message Date
Lucas De Marchi baa287e5e5 ArduPlane: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03: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
Andrew Tridgell 1797e2baa8 Plane: simpler initalisation of plane class
take advantage of C++11 in-class initialisation
2015-06-01 08:48:54 +10:00
Lucas De Marchi 7c4cf41ebc ArduPlane: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Andrew Tridgell 6fe65cdd9a Plane: removed duplicate rangefinder 2015-05-21 07:48:53 +10:00
Andrew Tridgell 18c37935c9 Plane: convert from .pde to .cpp files 2015-05-21 07:48:52 +10:00