Commit Graph

15 Commits

Author SHA1 Message Date
Peter Barker 5ae3c60e8b AP_Notify: fix nullptr in ToshibaLED example 2018-09-19 22:40:20 -07:00
Michael du Breuil c5669a614e AP_Notify: Remove unneeded init guards 2018-06-27 15:25:44 +10:00
Andrew Tridgell 697131e94a AP_Notify: support dual I2c toshiba LEDs
This restructures AP_Notify to allow for multiple backends of the same type.
2017-09-11 10:39:39 -07:00
Pierre Kancir 2f50e865c2 AP_Notify: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata 3ce2ca488a AP_Notify: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Randy Mackay 98db17e9a1 AP_Notify: example sketch uses ToshibaLED_I2C driver 2017-01-27 15:24:09 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
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
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 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 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 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
Andrew Tridgell 24e2e4b35e AP_Notify: convert example from .pde to .cpp 2015-06-01 17:07:05 +10:00