Commit Graph

84 Commits

Author SHA1 Message Date
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 1e619c6c59 AP_Motors: 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:19 +10:00
Andrew Tridgell d746e8fa29 AP_Motors: mark examples as nobuild
waiting for fix from Rob
2015-06-01 17:27:33 +10:00
Andrew Tridgell 89baf2bdf1 AP_Motors: convert example from .pde to .cpp 2015-06-01 17:07:05 +10:00
Randy Mackay b223e90ef6 AP_Motors: fix example sketches 2015-05-01 20:58:20 +09:00
Randy Mackay f5f7cd540f Motors: fix example sketches 2015-03-03 21:39:24 +09:00
Randy Mackay 80b498f598 Motors: add loop_rate to test sketch 2015-03-03 15:48:39 +09:00
Randy Mackay 38702a7e23 Motors: fix example sketch 2015-01-28 17:15:45 +09:00
Andrew Tridgell 2e83555892 AP_Motors: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell d9f20c6785 AP_Motors: fixed example build 2014-07-25 17:54:51 +10:00
Andrew Tridgell e448168ba6 AP_Motors: fixed example build 2014-07-14 10:41:16 +10:00
bugobliterator e6f27c9fac AP_Motors_Time_test.pde: use hal.scheduler->micros instead of gettimeofday 2014-07-14 09:31:59 +10:00
bugobliterator fb7ca9bb3c AP_Motors:add AP_Motors_Time_test 2014-07-14 09:29:45 +10:00
Víctor Mayoral Vilches d43c1cc544 AP_Motors_test: Adapt to test bench available 2014-07-14 09:29:08 +10:00
Randy Mackay 5cc26569fc AP_Motors: fix example sketch 2014-04-29 20:46:34 +09:00
Randy Mackay b78e59ea30 AP_Motors: add stability patch test to example sketch 2014-04-09 21:21:29 +09:00
Andrew Tridgell efdb678e00 AP_Motors: fixed example build 2014-04-07 11:55:56 +10:00
Randy Mackay d761ddd4af AP_Motors: fix example sketch 2014-02-15 06:09:08 +11:00
Randy Mackay 90937be3d4 AP_Motors: fix example sketch 2013-11-28 11:34:00 +09:00
Andrew Tridgell 316ec5864e AP_Motors: removed incorrect Makefile target 2013-11-23 18:50:55 +11:00
Randy Mackay d54b1ea446 CopterMotors: fix example sketch 2013-11-14 22:27:10 +09:00
Andrew Tridgell 5bef6dd539 AP_Motors: fixed example build 2013-09-13 10:53:53 +10:00
Andrew Tridgell 01387a1553 AP_Motors: fixed examples build 2013-08-30 13:01:39 +10:00
Andrew Tridgell e7dea077b4 AP_Motors: fixed example sketch 2013-01-02 22:02:46 +11:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell a1187519a8 AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches 2012-12-20 14:52:37 +11:00
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +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 c6fe5e5340 AP_Motors: ported to AP_HAL 2012-12-20 14:51:26 +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
rmackay9 50a4838879 AP_Motors, AP_RangeFinder, Filter: fixes to example sketches 2012-11-08 00:29:43 +09:00
uncrustify 364b089bd3 uncrustify libraries/AP_Motors/examples/AP_Motors_test/AP_Motors_test.pde 2012-08-21 19:03:35 -07:00
rmackay9 b71877366e ArduCopter - AP_Motors library - added new library which has few advantages over current code:
1. it's step towards rearchitecting the current code base ahead of a move to RTOS.
     2. internally it uses a MatrixTable for the Quad, Octa, OctaQuad, Y6 frames.
     3. it implements the missing stability patch for Octa and OctaQuads (still missing for Y6)

Later check-ins will incorporate into the main ArduCopter code.
2012-04-02 17:26:37 +09:00