mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-04 15:08:28 -04:00
2e464a53c2
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'. |
||
---|---|---|
.. | ||
examples | ||
AP_Math_AVR_Compat.h | ||
AP_Math.cpp | ||
AP_Math.h | ||
edc.cpp | ||
edc.h | ||
keywords.txt | ||
location.cpp | ||
matrix3.cpp | ||
matrix3.h | ||
matrix_alg.cpp | ||
polygon.cpp | ||
polygon.h | ||
quaternion.cpp | ||
quaternion.h | ||
rotations.h | ||
vector2.cpp | ||
vector2.h | ||
vector3.cpp | ||
vector3.h | ||
vectorN.h |