Commit Graph

86 Commits

Author SHA1 Message Date
Caio Marcelo de Oliveira Filho db1491f079 AP_GPS: remove unnecessary board includes from examples 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
Gustavo Jose de Sousa 67db430583 AP_GPS: 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:43 +10:00
Eugene Shamaev c6c6e2dc13 AP_GPS: add comments to example sketch 2015-06-08 10:04:36 +09:00
Andrew Tridgell e18a2df64e AP_GPS: convert example from .pde to .cpp 2015-06-01 16:58:11 +10:00
Andrew Tridgell 7320a35ad2 AP_GPS: convert example from .pde to .cpp 2015-06-01 16:58:11 +10:00
Randy Mackay fa4ba456b4 GPS: fix example sketches 2015-05-07 14:01:14 +09:00
Andrew Tridgell 2be45bc7e6 AP_GPS: fix for HAL_SITL rename 2015-05-05 09:45:55 +10:00
Gustavo Jose de Sousa be67b019a7 AP_GPS: Add missing setup for GPS_AUTO_test
GPS_AUTO_test was missing some setup lines.
2015-04-14 09:27:41 +10:00
ustas a2d5ac6805 AP_GPS: add includes for success build example sketch
include AP_Scheduler.h for achieve build GPS_UBLOX_passthrough example
2015-03-11 21:30:31 +09:00
Randy Mackay 1141363868 GPS: fix example sketches 2015-01-28 17:15:39 +09:00
Andrew Tridgell 62e7778ba8 AP_GPS: fixed build warning 2015-01-19 11:22:10 +11:00
Andrew Tridgell 908ad46e8e AP_GPS: fixed example build 2014-11-28 10:40:26 +11:00
Victor Mayoral Vilches 46c8714996 AP_GPS: make the examples compile in Linux 2014-11-08 11:25:35 +11:00
Andrew Tridgell b08b76b8ff AP_GPS: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell db1479b46b AP_GPS: fixed example build 2014-07-25 17:54:25 +10:00
Víctor Mayoral Vilches 70aafa380e GPS_UBLOX: fix test to work with AP_HAL_Linux.
Some libraries were missing.
2014-07-14 09:29:18 +10:00
Andrew Tridgell 30f5e2c37f AP_GPS: work around scheduling issue in example code 2014-05-16 22:35:32 +10:00
Andrew Tridgell 73976e2ca4 AP_GPS: fixed example build 2014-05-16 22:05:04 +10:00
Andrew Tridgell c2486d8d6e AP_GPS: updated examples for new API
removed old per-driver examples, and updates AUTO example
2014-04-01 06:38:25 +11:00
Andrew Tridgell c6f3e0a81c AP_GPS: fixed example builds 2014-03-24 12:20:34 +11:00
Andrew Tridgell 7ff293ca38 AP_GPS: added DataFlash to GPS init to allow for detailed logging
this will allow GPS drivers to log much more detailed device specific
information
2014-03-24 12:01:13 +11:00
Andrew Tridgell 6b5d27efbb AP_GPS: fixed example builds with change to init() 2014-03-16 06:44:50 +11:00
Randy Mackay bd6511dd0a GPS: add GPS_UBLOX_passthrough sketch
This sketch allows the user to configure the Ublox GPS using U-Center
without the need for an FTDI cable.
2013-11-24 14:53:08 +09:00
Andrew Tridgell 6f5ac1d553 AP_GPS: added support for GPS time in week/millisec
also adds time_epoch_usec() for MAVLink SYSTEM_TIME
2013-10-24 14:22:47 +11:00
Andrew Tridgell 448167e958 AP_GPS: fixed examples build 2013-09-24 11:57:03 +10:00
Andrew Tridgell e6bd3b65b9 AP_GPS: fixed examples build 2013-08-30 13:01:36 +10:00
Randy Mackay 496962f037 GPS: update notify 2013-08-30 13:01:35 +10:00
Andrew Tridgell c7141c4851 AP_GPS: fixed examples build 2013-07-15 14:09:07 +10:00
Andrew Tridgell edfebc1f29 AP_GPS: fixed indent-tabs-mode 2013-05-30 09:52:21 +10:00
Andrew Tridgell c3abdaf308 AP_GPS: removed duplicate print_latlon() 2013-04-20 13:57:59 +10:00
Andrew Tridgell 3b0398dc14 AP_GPS: fixed UBLOX example for PX4 2013-01-05 20:39:30 +11:00
Andrew Tridgell 2f111b857b AP_GPS: ported test code for PX4 2013-01-04 19:41:36 +11:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Craig@3DR f778961acf Added support for Mediatek firmware Rev 1.9 2013-01-02 09:16:47 +11:00
Andrew Tridgell ceb3f577d8 libraries: use new math functions 2012-12-20 14:53:22 +11:00
Andrew Tridgell 8beaec61a8 AP_GPS: fixed build for new syntax 2012-12-20 14:52:36 +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 f1869d1aa6 AP_GPS: GPS_406_test ported to AP_HAL 2012-12-20 14:51:40 +11:00
Pat Hickey d6cb240468 AP_GPS: GPS_NMEA_test ported to AP_HAL
* I wasn't able to demonstrate the library/test sketch working with my
  ublox gps.
2012-12-20 14:51:40 +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 d72c5cf828 AP_GPS: uartB fixup 2012-12-20 14:51:35 +11:00
Pat Hickey a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Andrew Tridgell 53105efbcd HAL_AVR: more uart0 -> console changes 2012-12-20 14:51:27 +11:00
Andrew Tridgell d133f15f57 HAL_AVR: use hal.console instead of hal.uart0 2012-12-20 14:51:27 +11:00
Pat Hickey c56c4ae240 Various example sketches: hal.uart0->begin(115200) is redundant. use console.
just assume uart0 is initialized by the HAL, because it is. DRY.
also, don't ever use uart0 explicitly in example sketches, use console
and let the hal figure it out.
2012-12-20 14:51:25 +11:00
Pat Hickey 9ed023aeb4 AP_GPS: Builds under AP_HAL. Not tested. 2012-12-20 14:51:25 +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