Commit Graph

17 Commits

Author SHA1 Message Date
Michael du Breuil c0017abb63 AP_Notify: Remove indirection on RGBLed of init()->hw_init()
Saves a bit of flash, and just makes the code a bit more obvious
2021-03-30 11:18:45 +11:00
Andrew Tridgell 0de65ca734 AP_Notify: removed unusued AP_Common/Semaphore.h 2019-05-15 15:33:48 +10:00
Andrew Tridgell bf829cd792 AP_Notify: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Michael du Breuil d0cd37fabb AP_Notify: Reduce flash consumption, remove unneeded middleware classes 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
Randy Mackay eedfe13f9c AP_Notify: fix ToshibaLED_I2C and check both I2C buses
the rgb value was never being set meaning the led was always off
external bus is checked first
2017-01-27 15:24:09 +09:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
Andrew Tridgell dbd192971f AP_Notify: fixed threading on toshibaled i2c 2016-11-09 17:08:02 +11:00
Lucas De Marchi 213c38afaf AP_Notify: ToshibaLED_I2C: add part number comment
It's easier to find the datasheet for this driver with the part number
rather than a generic "toshiba led".
2016-07-14 17:32:33 -03:00
Lucas De Marchi 5618008935 AP_Notify: ToshibaLED_I2C: Fix driver after I2CDevice conversion
- Add missing semaphore take on bus
    - Initialize device on init function rather than constructor: the
      constructor may run before I2CDeviceManager is initialized since our
      AP_Notify objects are static so it can't be used.
2016-07-14 17:32:33 -03:00
Luiz Ywata 0b69e43464 AP_Notify: ToshibaLED_I2C: use I2CDevice interface 2016-07-14 17:32:32 -03: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
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
Staroselskii Georgii d40011acf3 AP_Notify: added abstract Led and RGBLed classes 2014-11-26 11:16:27 +11:00
Andrew Tridgell fc5f825b6d AP_Notify: make APM2 ToshibaLED driver more efficient
use one I2C transfer, not 3
2013-11-04 17:48:53 +11:00
Randy Mackay 8f4665c4c7 ToshibaLED: ignore I2C errors during init 2013-10-21 20:01:34 +09:00
Andrew Tridgell d67ad2c7ee AP_Notify: added missing files 2013-08-30 13:01:35 +10:00