Commit Graph

63 Commits

Author SHA1 Message Date
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 780d0de4bb AP_RangeFinder: fix example build 2015-12-29 10:46:35 -08: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 fb24056ca9 AP_RangeFinder: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:44 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11: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 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 5d2279a554 AP_RangeFinder: remove unnecessary includes from example 2015-10-21 09:16:11 +11:00
Caio Marcelo de Oliveira Filho 6566deff66 AP_RangeFinder: fix compilation for Linux/SITL
Add libraries that those boards depend on. This should be handled in the
future elsewhere (and once for each board), but for now let's make it
compile again.
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
Andrew Tridgell 7d30ce2e36 AP_RangeFinder: added lightware serial rangefinder 2015-09-08 16:46:52 +10:00
Gustavo Jose de Sousa 5d39587469 AP_RangeFinder: 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:23 +10:00
Andrew Tridgell b2fb2c676e AP_RangeFinder: convert example from .pde to .cpp 2015-06-01 17:07:06 +10:00
Andrew Tridgell ac43972883 AP_RangeFinder: fix for HAL_SITL rename 2015-05-05 09:45:56 +10:00
Randy Mackay a01fb64f12 RangeFinder: fix example sketch 2015-04-24 10:57:25 +09:00
Andrew Tridgell 9c0614c7bb AP_RangeFinder: default test to I2C Lidar 2015-03-15 13:50:59 +11:00
Randy Mackay d5f02ec0df RangeFinder: fix example sketch 2015-01-28 17:15:50 +09:00
Andrew Tridgell 8540174854 AP_Rangefinder: fixed example build 2014-08-13 21:48:36 +10:00
akdslr a404404806 AP_RangeFinder: Added a call to sonar.update in RFIND_test 2014-08-04 22:13:16 +10:00
Andrew Tridgell 7bf72d1c2b AP_RangeFinder: fixed example build 2014-07-25 17:55:11 +10:00
akdslr 2c86f5df94 AP_RangeFinder: Updated RFIND_test example to not use Auto and added more device details 2014-07-24 14:41:55 +10:00
Andrew Tridgell c45f1961f6 AP_RangeFinder: removed old test code 2014-07-21 09:39:48 +10:00
Andrew Tridgell fe92ef5c32 AP_RangeFinder: added an example program 2014-07-21 09:39:12 +10:00
Andrew Tridgell fe475a3561 AP_RangeFinder: removed old PulsedLightLRF example 2014-07-14 10:43:17 +10:00
Andrew Tridgell 5d6ef45662 AP_RangeFinder: removed old MaxSonarXL example 2014-07-14 10:42:20 +10:00
Andrew Tridgell c425e7e060 AP_RangeFinder: fixed example build 2014-07-14 10:41:28 +10:00
akdslr 5f4168d5f8 AP_RangeFinder_PX4_test: Added an example sketch for the PX4 range finder 2014-07-08 15:07:49 +10:00
Randy Mackay 4c38999ca6 Maxsonar Test: remove raw from output to user 2014-02-10 15:00:08 +09:00
Randy Mackay 3970c8f038 RangeFinder: add PulsedLight example sketch 2013-12-02 20:06:49 +09:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell 393455cdbb RangeFinder: fixed example build 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 a4fdfd999c remove AP_RangeFinder_test: deprecated by AP_HAL 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 a38ce8962e AP_Rangefinder: ported to AP_HAL. Only officially supports MaxsonarXL. 2012-12-20 14:51:30 +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 2f8e467ab2 RangeFinder: fixed example build 2012-11-24 21:08:25 +11:00
rmackay9 321d40f73a AP_RangeFinder: added support for MaxBotix XL I2C sonar 2012-11-12 00:25:29 +09:00
rmackay9 50a4838879 AP_Motors, AP_RangeFinder, Filter: fixes to example sketches 2012-11-08 00:29:43 +09:00
uncrustify 5abb025c9e uncrustify libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde 2012-08-21 19:04:10 -07:00
rmackay9 4dd4c95d5c AP_AnalogSource_Arduino: fix to allow analog port to be read to be specified as a "channel" (i.e. A0)
Also fixed example range finder sketch to work with interrupt enabled AP_AnalogSource_Arduino class
2012-07-11 21:19:17 +09:00
rmackay9 2b6a10d18b AP_RangeFinder - changed example sketch to work with new Filter library 2012-02-28 21:02:10 +09:00
rmackay9 f264e29814 AP_RangeFinder - cut over to use new ModeFilter from Filter library 2012-02-26 15:34:50 +09:00
Randy Mackay 8dee001657 Sonar - changed default pin to A0 2012-01-26 22:50:48 +09:00
Randy Mackay e070109e21 AP_RangeFinder - change sonar example sketch to use default Sonar PIN for APM2 (A1) 2011-12-18 14:15:50 +09:00