APM:Libraries
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
RGBLed Class Referenceabstract

#include <RGBLed.h>

Inheritance diagram for RGBLed:
[legend]
Collaboration diagram for RGBLed:
[legend]

Public Member Functions

 RGBLed (uint8_t led_off, uint8_t led_bright, uint8_t led_medium, uint8_t led_dim)
 
virtual bool init (void)
 
virtual bool healthy ()
 
virtual void set_rgb (uint8_t red, uint8_t green, uint8_t blue)
 
virtual void update ()
 
virtual void handle_led_control (mavlink_message_t *msg) override
 
- Public Member Functions inherited from NotifyDevice
virtual ~NotifyDevice ()
 
virtual void handle_play_tune (mavlink_message_t *msg)
 

Protected Member Functions

virtual bool hw_init (void)=0
 
virtual bool hw_set_rgb (uint8_t red, uint8_t green, uint8_t blue)=0
 
virtual void _set_rgb (uint8_t red, uint8_t green, uint8_t blue)
 
virtual void update_override ()
 

Protected Attributes

uint8_t counter
 
uint8_t step
 
bool _healthy
 
uint8_t _red_des
 
uint8_t _green_des
 
uint8_t _blue_des
 
uint8_t _red_curr
 
uint8_t _green_curr
 
uint8_t _blue_curr
 
uint8_t _led_off
 
uint8_t _led_bright
 
uint8_t _led_medium
 
uint8_t _led_dim
 
struct {
   uint8_t   r
 
   uint8_t   g
 
   uint8_t   b
 
   uint8_t   rate_hz
 
   uint32_t   start_ms
 
_led_override
 

Private Member Functions

virtual void update_colours ()
 

Additional Inherited Members

- Public Attributes inherited from NotifyDevice
const AP_NotifypNotify
 

Detailed Description

Definition at line 25 of file RGBLed.h.

Constructor & Destructor Documentation

◆ RGBLed()

RGBLed::RGBLed ( uint8_t  led_off,
uint8_t  led_bright,
uint8_t  led_medium,
uint8_t  led_dim 
)

Definition at line 26 of file RGBLed.cpp.

Member Function Documentation

◆ _set_rgb()

void RGBLed::_set_rgb ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
protectedvirtual

Definition at line 51 of file RGBLed.cpp.

Referenced by healthy(), set_rgb(), and update_override().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_led_control()

void RGBLed::handle_led_control ( mavlink_message_t *  msg)
overridevirtual

Reimplemented from NotifyDevice.

Definition at line 356 of file RGBLed.cpp.

Referenced by healthy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ healthy()

virtual bool RGBLed::healthy ( void  )
inlinevirtual

Definition at line 33 of file RGBLed.h.

Referenced by setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hw_init()

virtual bool RGBLed::hw_init ( void  )
protectedpure virtual

Implemented in Led_Sysfs, DiscoLED, VRBoard_LED, DiscreteRGBLed, PixRacerLED, ToshibaLED_I2C, NavioLED_I2C, RCOutputRGBLed, and UAVCAN_RGB_LED.

Referenced by healthy(), and init().

Here is the caller graph for this function:

◆ hw_set_rgb()

virtual bool RGBLed::hw_set_rgb ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
protectedpure virtual

Implemented in RCOutputRGBLedOff, Led_Sysfs, DiscoLED, VRBoard_LED, DiscreteRGBLed, PixRacerLED, ToshibaLED_I2C, NavioLED_I2C, RCOutputRGBLed, and UAVCAN_RGB_LED.

Referenced by _set_rgb(), and healthy().

Here is the caller graph for this function:

◆ init()

bool RGBLed::init ( void  )
virtual

Implements NotifyDevice.

Definition at line 44 of file RGBLed.cpp.

Referenced by setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_rgb()

void RGBLed::set_rgb ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
virtual

Definition at line 66 of file RGBLed.cpp.

Referenced by blink(), full_spectrum(), healthy(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void RGBLed::update ( void  )
virtual

Implements NotifyDevice.

Definition at line 339 of file RGBLed.cpp.

Referenced by healthy(), and loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_colours()

void RGBLed::update_colours ( void  )
privatevirtual

Definition at line 81 of file RGBLed.cpp.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_override()

void RGBLed::update_override ( void  )
protectedvirtual

Definition at line 391 of file RGBLed.cpp.

Referenced by healthy(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _blue_curr

uint8_t RGBLed::_blue_curr
protected

Definition at line 60 of file RGBLed.h.

Referenced by _set_rgb().

◆ _blue_des

uint8_t RGBLed::_blue_des
protected

Definition at line 59 of file RGBLed.h.

Referenced by update(), and update_colours().

◆ _green_curr

uint8_t RGBLed::_green_curr
protected

Definition at line 60 of file RGBLed.h.

Referenced by _set_rgb().

◆ _green_des

uint8_t RGBLed::_green_des
protected

Definition at line 59 of file RGBLed.h.

Referenced by update(), and update_colours().

◆ _healthy

bool RGBLed::_healthy
protected

Definition at line 58 of file RGBLed.h.

Referenced by healthy(), init(), set_rgb(), and update().

◆ _led_bright

uint8_t RGBLed::_led_bright
protected

◆ _led_dim

uint8_t RGBLed::_led_dim
protected

Definition at line 64 of file RGBLed.h.

Referenced by update_colours().

◆ _led_medium

uint8_t RGBLed::_led_medium
protected

Definition at line 63 of file RGBLed.h.

Referenced by update_colours().

◆ _led_off

uint8_t RGBLed::_led_off
protected

Definition at line 61 of file RGBLed.h.

Referenced by ToshibaLED_I2C::hw_init(), RCOutputRGBLedOff::hw_set_rgb(), and update_colours().

◆ _led_override

struct { ... } RGBLed::_led_override

◆ _red_curr

uint8_t RGBLed::_red_curr
protected

Definition at line 60 of file RGBLed.h.

Referenced by _set_rgb().

◆ _red_des

uint8_t RGBLed::_red_des
protected

Definition at line 59 of file RGBLed.h.

Referenced by update(), and update_colours().

◆ b

uint8_t RGBLed::b

Definition at line 67 of file RGBLed.h.

Referenced by PixRacerLED::hw_set_rgb().

◆ counter

uint8_t RGBLed::counter
protected

Definition at line 56 of file RGBLed.h.

Referenced by update_colours().

◆ g

uint8_t RGBLed::g

Definition at line 67 of file RGBLed.h.

Referenced by PixRacerLED::hw_set_rgb().

◆ r

uint8_t RGBLed::r

Definition at line 67 of file RGBLed.h.

Referenced by PixRacerLED::hw_set_rgb().

◆ rate_hz

uint8_t RGBLed::rate_hz

Definition at line 68 of file RGBLed.h.

◆ start_ms

uint32_t RGBLed::start_ms

Definition at line 69 of file RGBLed.h.

◆ step

uint8_t RGBLed::step
protected

Definition at line 57 of file RGBLed.h.

Referenced by update_colours().


The documentation for this class was generated from the following files: