Commit Graph

164 Commits

Author SHA1 Message Date
Lucas De Marchi 5ba20b1763 AP_Notify: sanitize includes
Due to the way the headers are organized changing a single change in
an AP_Notify driver would trigger a rebuild for most of the files in
the project. Time could be saved by using ccache (since most of the
things didn't change) but we can do better, i.e. re-organize the headers
so we don't have to re-build everything.
2016-02-01 14:18:51 -02: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
mirkix 1744bc0850 AP_Notify: Use display with bbbmini 2016-01-07 14:32:56 -02:00
mirkix 2457558624 AP_Notify: Add display support 2016-01-07 14:32:56 -02:00
mirkix dee20a31f1 AP_Notify: Add gps_num_sats 2016-01-07 14:32:56 -02:00
Víctor Mayoral Vilches d73fc4c0b2 AP_Notify: Add PXFmini support 2016-01-05 15:35:56 -02:00
Randy Mackay 4e9f82a0e7 Notify: fix parameter description 2015-12-31 11:33:02 +09:00
pepevalbe 0d5e59eaa3 AP_Notify: configurable RGB LED brightness 2015-12-31 11:32:59 +09:00
Jonathan Challinger 99636b3e8b AP_Notify: 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
Aaron Wang Shi fc2e810fb2 AP_Notify: add 1 RGB and board LEDs to BH hat 2015-12-21 15:54:30 +11:00
José Roberto de Souza 63e1d0753e AP_Notify: Add a new RGBLed implementation that works over RCOutput
To be used in boards that uses the same PWM chip to generate signal to
control motors and the status led.
2015-12-16 08:18:17 +11:00
Lucas De Marchi a4213166ae AP_Notify: 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
Julien BERAUD 0fa362ff5c AP_Notify: Fix GPIO declaration for Linux boards
Currently, the default behaviour on linux boards tries to
write LED gpios with fixed values among them. There is no way
to declare that there are no LED GPIOs.
This commit moves the declaration of the LED Gpios in AP_HAL_Boards.h
and makes AP_Notify do nothing if no LED gpio was declared
2015-12-01 07:07:26 +11:00
Caio Marcelo de Oliveira Filho daee8e8e76 AP_Notify: use millis/micros/panic functions 2015-11-20 12:33:13 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Víctor Mayoral Vilches 4a2fe12652 AP_Notify: Add support for Erle-Brain 2 2015-11-04 13:58:24 +11:00
Víctor Mayoral Vilches b54b8aa8af AP_HAL_Linux: AP_BoardLED add support for Erle-Brain 2 2015-11-04 13:58:24 +11:00
Lucas De Marchi d2c18a5c7b AP_Notify: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11: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
Lucas De Marchi f915d2ff6f AP_Notify: don't define devices for minlure
It still doesn't have a notify device.
2015-10-22 12:04:53 +11:00
Caio Marcelo de Oliveira Filho d840fc0680 AP_Notify: remove unnecessary includes from examples 2015-10-21 09:16:11 +11:00
Caio Marcelo de Oliveira Filho d51adf2523 AP_Notify: fix build of ToshibaLED_test in PX4
The unused variables were causing error due to shadowing. The
AP_Scheduler library was missing from make.inc.
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 e0db1ad93e AP_Notify: added support for raspilot LED 2015-09-14 14:22:16 +10:00
Angus Peart 95c66a794e AP_Notify: sync oreoleds before a reboot 2015-09-09 10:39:54 +09:00
Angus Peart a887c1d1f2 AP_Notify: fix oreoled race causing startup flicker 2015-09-09 10:39:53 +09:00
Angus Peart d48f1b0ccf AP_Notify: oreoled - remove dangerous send_bytes 2015-09-09 10:39:52 +09:00
Angus Peart 662a3aa4cb AP_Notify: oreoled - always use full brightness 2015-09-09 10:39:51 +09:00
Jonathan Challinger d205de2d7e AP_Notify: use new macros for white/red pattern 2015-09-09 10:39:51 +09:00
Randy Mackay 872e6769b0 Notify: change firmware_update event to flag 2015-09-09 10:39:50 +09:00
Jace A Mogill 068cdfe6a3 Notify: workaround for OREOLED problems 2015-09-09 10:39:49 +09:00
Jonathan Challinger 28ee63c855 AP_Notify: add events.compass_cal_canceled 2015-09-03 16:59:11 +10:00
Jonathan Challinger adef826a42 AP_Notify: play tones for compass cal 2015-09-03 16:59:11 +10:00
Jonathan Challinger 89007c13cb AP_Notify: add compass_cal flags 2015-09-03 16:59:11 +10:00
mirkix f6f2e901b8 AP_Notify: Disable ToneAlarm for BBBMINI 2015-09-02 11:10:59 +10:00
Lucas De Marchi d446381623 AP_HAL_Notify: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Gustavo Jose de Sousa 6d667e19b1 AP_Notify: 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:20 +10:00
Randy Mackay 73ff01dc68 AP_Notify: replace unsigned int with uint8_t 2015-07-21 13:52:03 +09:00
Lucas De Marchi 1bba105be4 AP_Notify: don't manually define number of notify devices
Like b211b86 (AP_HAL_Linux: don't manually define number of spi devices)
did for spi.
2015-07-21 13:52:00 +09:00
Randy Mackay 2f8a7f316f Notify: enable toshibaLED for NAVIO 2015-07-07 20:08:19 +09:00
Lucas De Marchi b3da1579c1 AP_Notify: rename member to initialized
We are not only checking if there was an error, but if it was already
initialized.  Let's make it explicit by inverting the value we store.
2015-06-10 16:39:01 +10:00
Lucas De Marchi 3f8dab41c4 AP_Notify: fix wrong boolean check
Check by false instead of checking by -1. Fix the following compiler warning
with gcc 5.1.0:

ardupilot/libraries/AP_Notify/ToneAlarm_Linux.cpp:64:13: warning: comparison of constant '-1' with boolean expression is always false [-Wbool-compare]
     if (err == -1) {
             ^

Also change the initialization code not to use -1.
2015-06-10 16:39:01 +10:00
Andrew Tridgell 23d291f144 AP_Notify: update for upstream merge 2015-06-09 19:44:20 +10:00
Andrew Tridgell 24e2e4b35e AP_Notify: convert example from .pde to .cpp 2015-06-01 17:07:05 +10:00