Commit Graph

55 Commits

Author SHA1 Message Date
Peter Barker 9ab33fd3c4 AP_Mission: use enum class for AltFrame enumeration 2019-03-19 10:31:18 +11:00
Peter Barker 2fa0b61f8b AP_Math: update example/test for Location_Class merge 2019-01-16 11:45:29 +11:00
Peter Barker a9b94ae13d AP_Mission: use ahrs singleton 2018-11-08 10:01:16 +09:00
Lucas De Marchi 25490b6151 AP_Mission: use ins singleton 2018-03-16 00:37:35 -07:00
Peter Barker beb85e49fb AP_Mission: use baro singleton 2018-03-08 21:20:05 -08:00
Peter Barker 89d3289400 AP_Mission: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Andrew Tridgell a3e07f66a1 AP_Mission: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Lucas De Marchi bfd13dfe87 global: use static method to construct AP_AHRS_DCM 2017-09-26 03:01:21 +01:00
Lucas De Marchi b36a5919f5 global: use static method to construct AP_Mission
This also move the initialization to be in the header for those that
weren't already to maintain consistency.
2017-09-26 03:01:21 +01:00
Lucas De Marchi 8094482f21 global: use static method to construct AP_GPS 2017-09-26 03:01:21 +01:00
Lucas De Marchi 87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi c1a957fbf3 global: use static method to construct Compass 2017-09-26 03:01:21 +01:00
Lucas De Marchi 91feec0e14 global: use static method to construct AP_Baro 2017-09-26 03:01:21 +01:00
murata 9481e0d158 AP_Mission: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa d281067bcc waf: make example binaries be placed in 'examples' dir
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Jonathan Challinger 30a563044e AP_Mission: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi 326e74f64f AP_Mission: don't link unused AP_Curve library 2015-12-28 10:23:23 -02:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 3818a8a703 AP_Mission: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:43 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Caio Marcelo de Oliveira Filho 01e4265ce1 AP_Mission: example uses millis/micros/panic functions 2015-11-20 12:32:09 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi a964ac38ec Replace use of print_P() with print() 2015-10-30 14:35:21 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Caio Marcelo de Oliveira Filho 118de8d01f AP_Mission: remove unnecessary includes from 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
Gustavo Jose de Sousa 34d1a29ec1 AP_Mission: 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 767aeedf01 AP_Mission: fixed example sketch 2015-06-01 18:05:38 +10:00
Andrew Tridgell d1ed4c863c AP_Mission: convert example from .pde to .cpp 2015-06-01 17:07:04 +10:00
Andrew Tridgell 0c142bb25a AP_Mission: fix for HAL_SITL rename 2015-05-05 09:45:55 +10:00
Randy Mackay ed61d961c3 Mission: fix example sketch 2015-05-01 20:58:06 +09:00
Randy Mackay b01f9505b1 Mission: fix example sketch
Also replace printf with print where possible
2015-03-16 20:29:05 +09:00
Andrew Tridgell 3a1cbaeb25 AP_Mission: fix for new compass API 2015-03-13 18:46:18 +11:00
Randy Mackay 4772fd338c Mission: fix example sketch 2015-03-13 16:40:59 +09:00
Randy Mackay 355a92aff4 Mission: fix example sketch 2015-01-28 17:15:44 +09:00
Andrew Tridgell 8aa1a89081 AP_Mission: updates for new AP_Baro API 2015-01-09 11:50:56 +11:00
Andrew Tridgell 868ee3af23 AP_Mission: fixed example build 2014-10-24 12:10:40 +11:00
Andrew Tridgell 3357df9529 AP_Mission: fixed example sketch 2014-08-14 10:48:31 +10:00
Andrew Tridgell ce193f5c5c AP_Mission: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell 50f67dd57d AP_Mission: fixed example build 2014-07-25 17:54:45 +10:00
Randy Mackay 5322093475 Mission: fix example sketch after GPS lib changes 2014-04-17 16:41:38 +09:00
Randy Mackay 8e117d29eb Mission: test exceeding command storage size 2014-03-19 12:11:55 +09:00
Randy Mackay e60865b715 Mission: example sketch test for set_current_cmd 2014-03-19 12:11:12 +09:00
Randy Mackay 5dd86bd7d7 Mission: update example sketch for p1's move to cmd structure 2014-03-19 12:10:49 +09:00
Randy Mackay 4c0ae63169 Mission: example sketch test replace_cmd method 2014-03-19 12:10:42 +09:00
Randy Mackay ef21e32fbc Mission: example sketch tests set current command 2014-03-19 12:10:37 +09:00