ardupilot/libraries
Caio Marcelo de Oliveira Filho efbc7648b1 AP_HAL: create AP_HAL namespace and use for some HAL functionality
For certain basic functionality, there aren't much benefit to be able to
vary the implementation easily at runtime. So instead of using virtual
functions, use regular functions that are "resolved" at link time. The
implementation of such functions is provided per board/platform.

Examples of functions that fit this include: getting the current
time (since boot), panic'ing, getting system information, rebooting.

These functions are less likely to benefit from the indirection provided
by virtual interfaces. For more complex hardware access APIs the
indirection makes more sense and ease the testing (when we have it!).

The idea is that instead of calling

    hal.scheduler->panic("on the streets of london");

now use

    AP_HAL::panic("on the streets of london");

A less important side-effect is that call-site code gets
smaller. Currently the compiler needs to get the hal, get the scheduler
pointer, get the right function pointer in the vtable for that
scheduler. And the call must include an extra parameter ("this"). Now it
will be just a function call, with the address resolved at link time.

This patch introduces the first functions that will be in the namespace,
further patches will implementations for each board and then switch the
call-sites. The extra init() function allow any initial setup needed for
the functions to work.
2015-11-20 12:25:24 +09:00
..
AC_AttitudeControl AC_PosControl: run velocity controller z-axis at 400hz 2015-11-18 13:31:21 +09:00
AC_Fence Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AC_InputManager AC_InputManager: Initial class creation 2015-11-12 19:37:21 +09:00
AC_PID build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AC_PrecLand AC_PrecLand: init members to resolve compile warning 2015-11-12 14:43:38 +09:00
AC_Sprayer Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AC_WPNav AC_WPNav: WPNAV_LOIT_SPEED WPNAV_LOIT_MAXA take effect immediately 2015-11-18 22:12:39 +09:00
AP_ADC build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_ADC_AnalogSource AP_ADC_AnalogSource: standardize inclusion of libaries headers 2015-08-11 16:28:41 +10:00
AP_AHRS build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_Airspeed build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_Arming AP_Arming: status text severity to INFO 2015-11-10 13:11:36 +09:00
AP_Baro AP_Baro: MS5611: remove empty statement 2015-11-11 13:48:48 +11:00
AP_BattMonitor build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_BoardConfig AP_BoardConfig: fixed PX4v1 build 2015-11-06 17:10:08 +11:00
AP_Buffer AP_Buffer: change pop_front to return a bool if successful 2014-10-20 08:26:14 +11:00
AP_Camera AP_Camera: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
AP_Common AP_Common: fixed examples build 2015-11-16 07:58:13 +11:00
AP_Compass build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_Curve AP_Curve: remove wrong comment about PSTR 2015-10-30 14:35:49 +09:00
AP_Declination build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_EPM Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_Frsky_Telem AP_Frsky_Telem: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_GPS GPS_UBlox: reorder init to resolve compiler warning 2015-11-16 15:09:17 +09:00
AP_HAL AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
AP_HAL_AVR Remove AP_HAL_AVR 2015-11-04 12:14:11 +11:00
AP_HAL_Empty Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
AP_HAL_FLYMAPLE AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
AP_HAL_Linux AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
AP_HAL_PX4 AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
AP_HAL_SITL AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
AP_HAL_VRBRAIN AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
AP_InertialNav AP_InertialNav: Address peer review comments 2015-10-20 15:21:36 +11:00
AP_InertialSensor AP_InertialSensor: fixed flymaple build 2015-11-17 08:52:49 +11:00
AP_IRLock IRLock: replace tabs with spaces 2015-08-31 18:00:33 +09:00
AP_L1_Control AP_L1_Control: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11:00
AP_LandingGear Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_Limits Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
AP_Math build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_Menu AP_Menu: fix wrong printf format for printf 2015-10-30 14:35:41 +09:00
AP_Mission AP_Mission: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11:00
AP_Motors build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_Mount build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_NavEKF AP_NavEKF: we can assume get_sample_rate() returns a non-zero number 2015-11-18 11:48:50 +11:00
AP_NavEKF2 AP_NavEKF2: Parameter changes to reduce noise on gyro bias estimates 2015-11-18 20:17:03 +09:00
AP_Navigation AP_Navigation: standardize inclusion of libaries headers 2015-08-11 16:38:20 +10:00
AP_Notify build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_OpticalFlow build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AP_Parachute AP_Parachute: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11:00
AP_Param AP_Param: copter with vectors when sending parameters 2015-11-09 14:28:20 +11:00
AP_PerfMon Minimize AP_Progmem.h includes 2015-10-30 14:35:32 +09:00
AP_Progmem AP_Progmem: remove dead code 2015-10-30 14:35:47 +09:00
AP_Rally Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_RangeFinder AP_RangeFinder: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
AP_RCMapper Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_Relay AP_Relay: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
AP_RPM Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_RSSI Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_Scheduler Minimize AP_Progmem.h includes 2015-10-30 14:35:32 +09:00
AP_SerialManager AP_SerialManager: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
AP_ServoRelayEvents AP_ServoRelayEvents: standardize inclusion of libaries headers 2015-08-11 16:38:23 +10:00
AP_SpdHgtControl AP_SpdHgtControl: added flight stage FLIGHT_LAND_ABORT 2015-09-09 09:04:24 +10:00
AP_TECS Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AP_Terrain AP_Terrain: cache status 2015-11-09 08:36:41 +11:00
AP_Vehicle AP_Vehicle: standardize inclusion of libaries headers 2015-08-11 16:38:24 +10:00
APM_Control Minimize AP_Progmem.h includes 2015-10-30 14:35:32 +09:00
APM_OBC APM_OBC: status text severity to INFO or ERROR 2015-11-10 13:11:38 +09:00
APM_PI Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
DataFlash build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
doc Checking these in makes the libraries too bulky. We need to host them somewhere. 2011-01-04 06:22:02 +00:00
Filter Filter: removed reference to old 'Desktop' build 2015-11-16 08:06:05 +11:00
GCS_Console build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
GCS_MAVLink GCS_MAVLink: fixed corner case in MAVLink routing 2015-11-13 13:38:53 +11:00
PID build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
RC_Channel build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
SITL SITL: expose update rate to HAL_SITL 2015-11-16 17:57:36 +11:00
StorageManager StorageManager: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00