Commit Graph

58 Commits

Author SHA1 Message Date
Caio Marcelo de Oliveira Filho 9b73fcb6f8 AP_AHRS: remove unnecessary includes in the example 2015-10-21 09:16:11 +11:00
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
Randy Mackay b5e1ad89b3 AHRS: remove INS start style from example sketch 2015-09-21 17:06:23 +09:00
Gustavo Jose de Sousa 54d5277842 AP_AHRS: 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:28:42 +10:00
mirkix d169fea9ec AP_AHRS: Add Linux support for example 2015-06-18 08:59:16 +10:00
Andrew Tridgell edab50ab5a AP_AHRS: convert example from .pde to .cpp 2015-06-01 16:58:10 +10:00
Randy Mackay 3390d9932e AP_AHRS: fix example sketch 2015-05-09 12:23:05 +09:00
Tom Pittenger 20f47417d5 AP_AHRS: compiler warnings: apply is_zero(float) or is_equal(float) and float to doubles 2015-05-05 13:26:55 +10:00
Andrew Tridgell e597575747 AP_AHRS: fix for HAL_SITL rename 2015-05-05 09:45:54 +10:00
Tom Pittenger e28c555889 AHRS_DCM: fix compile warnings re float constants
Also fix example sketch
2015-04-24 12:26:08 +09:00
Randy Mackay 7f25938834 AHRS: fix example sketch 2015-03-16 20:29:19 +09:00
Andrew Tridgell b488d6de00 AP_AHRS: fix for new compass API 2015-03-13 18:46:17 +11:00
Andrew Tridgell 031c81beee AP_AHRS: removed call to 1D accel cal 2015-03-12 12:50:29 +11:00
mirkix 49d81a9c99 AP_AHRS: fix apm1 oilpan support 2015-02-11 18:22:39 +11:00
Randy Mackay b66a1135d9 AHRS: fix example sketch compile error 2015-02-03 15:57:11 +09:00
Randy Mackay d8664d15d6 AHRS: fix example sketch 2015-01-28 17:15:35 +09:00
Andrew Tridgell d2c827aa4b AP_AHRS: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell 38c1b622f3 AP_AHRS: fixed example build on APM2 2014-11-28 17:59:18 +11:00
Andrew Tridgell 89cdae62b4 AP_AHRS: fixed example build 2014-11-28 10:40:52 +11:00
Andrew Tridgell f79ce92673 AP_AHRS: fixed example build 2014-10-24 12:10:40 +11:00
Andrew Tridgell 0f5b65e40e AP_AHRS: fixed example build 2014-08-13 21:46:04 +10:00
Andrew Tridgell 82d0666501 AP_AHRS: fixed example build 2014-07-25 17:54:04 +10:00
Andrew Tridgell d70bee9249 AP_AHRS: fix for HAL_GPIO_* 2014-06-02 10:42:36 +10:00
Andrew Tridgell 35c111a63a AP_AHRS: fixed example build 2014-04-01 06:38:25 +11:00
Andrew Tridgell afab8a9c5b AP_AHRS: fixed example build 2014-03-19 12:14:02 +09:00
Randy Mackay 5bdc564191 AP_AHRS: fix example sketch 2014-02-15 06:09:08 +11:00
Andrew Tridgell d31e557983 AP_AHRS: save memory and reduce pointer references
use a refence for ins, and don't save gyro and accel between updates
2013-11-04 21:21:37 +11:00
Andrew Tridgell 8ee848a788 AP_AHRS: update for Stub -> HIL 2013-09-28 22:04:15 +10:00
Randy Mackay 8306d74da0 AHRS: remove DMP as an ahrs 2013-09-27 10:42:46 +09:00
Andrew Tridgell e1aa6e3ff1 libraries: fixed examples for no flash_leds() callback 2013-09-19 18:38:28 +10:00
Andrew Tridgell 15a4582ed7 AP_AHRS: changed to AP_Vehicle.h 2013-09-13 11:46:10 +10:00
Andrew Tridgell 6182571c21 AP_AHRS: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell 1bd6849d00 AP_AHRS: fixed example build 2013-07-15 14:10:17 +10:00
Andrew Tridgell e75253d019 AP_AHRS: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell 811c2ccc11 libraries: fixes for AP_Baro_HIL 2013-05-02 15:09:05 +10:00
Andrew Tridgell 54b826a583 AP_AHRS: update for new compass API 2013-05-02 12:48:14 +10:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Andrew Tridgell fc66f5594f AHRS: allow AHRS test to build with SITL 2012-12-20 14:52:34 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Pat Hickey 70f34656bc AP_AHRS: uart1 -> uartB fixup 2012-12-20 14:51:34 +11:00
Pat Hickey 9bf69d4e0d AP_AHRS: port to AP_HAL 2012-12-20 14:51:29 +11:00
Pat Hickey 3f1d9d7f69 AP_Param: #include <AP_Param.h> fixups for libraries & sketches
* I mostly went through with grep and added an #include <AP_Param.h> below
  every #include <AP_Common.h>. Not all of these example sketches might
  strictly need AP_Param.
2012-12-20 14:51:19 +11:00
Andrew Tridgell 51080d3e9e AHRS: update example for new ins interface 2012-11-30 07:15:19 +11:00
rmackay9 56f88821e9 AP_AHRS: fix example sketch
AP_Airspeed: fix example sketch
AP_Baro: fix example sketch
AP_Declination: fix example sketch
AP_Math: fix example sketch
2012-11-08 00:08:18 +09:00
rmackay9 9e3824a09b AP_AHRS: fix compile error in example sketch 2012-11-01 21:56:34 +09:00
rmackay9 41fbb19cf5 AP_InertialSensor_MPU6000: replaced _cs_pin parameter with #define and saved 1 byte of memory
Updated ArduCopter, ArduPlane and example sketches in AP_InertialSensor, AP_IMU and AP_AHRS libraries because they no longer need to pass in cs_pin to the constructor
2012-09-28 19:21:59 +09:00
rmackay9 1c9fe3b1b6 AP_AHRS: fix to allow example sketch to compile 2012-09-13 16:45:52 +09:00