APM:Libraries
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
DiscreteRGBLed Class Reference

#include <DiscreteRGBLed.h>

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

Public Member Functions

 DiscreteRGBLed (uint16_t red, uint16_t green, uint16_t blue, bool polarity)
 
- Public Member Functions inherited from RGBLed
 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

bool hw_init (void) override
 
bool hw_set_rgb (uint8_t red, uint8_t green, uint8_t blue) override
 
- Protected Member Functions inherited from RGBLed
virtual void _set_rgb (uint8_t red, uint8_t green, uint8_t blue)
 
virtual void update_override ()
 

Private Attributes

AP_HAL::DigitalSourcered_pin
 
AP_HAL::DigitalSourcegreen_pin
 
AP_HAL::DigitalSourceblue_pin
 
uint16_t red_pin_number
 
uint16_t green_pin_number
 
uint16_t blue_pin_number
 

Additional Inherited Members

- Public Attributes inherited from NotifyDevice
const AP_NotifypNotify
 
- Protected Attributes inherited from RGBLed
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
 

Detailed Description

Definition at line 23 of file DiscreteRGBLed.h.

Constructor & Destructor Documentation

◆ DiscreteRGBLed()

DiscreteRGBLed::DiscreteRGBLed ( uint16_t  red,
uint16_t  green,
uint16_t  blue,
bool  polarity 
)

Definition at line 18 of file DiscreteRGBLed.cpp.

Member Function Documentation

◆ hw_init()

bool DiscreteRGBLed::hw_init ( void  )
overrideprotectedvirtual

Implements RGBLed.

Definition at line 30 of file DiscreteRGBLed.cpp.

Here is the call graph for this function:

◆ hw_set_rgb()

bool DiscreteRGBLed::hw_set_rgb ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
overrideprotectedvirtual

Implements RGBLed.

Definition at line 48 of file DiscreteRGBLed.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ blue_pin

AP_HAL::DigitalSource* DiscreteRGBLed::blue_pin
private

Definition at line 34 of file DiscreteRGBLed.h.

Referenced by hw_init(), and hw_set_rgb().

◆ blue_pin_number

uint16_t DiscreteRGBLed::blue_pin_number
private

Definition at line 36 of file DiscreteRGBLed.h.

Referenced by hw_init().

◆ green_pin

AP_HAL::DigitalSource* DiscreteRGBLed::green_pin
private

Definition at line 33 of file DiscreteRGBLed.h.

Referenced by hw_init(), and hw_set_rgb().

◆ green_pin_number

uint16_t DiscreteRGBLed::green_pin_number
private

Definition at line 36 of file DiscreteRGBLed.h.

Referenced by hw_init().

◆ red_pin

AP_HAL::DigitalSource* DiscreteRGBLed::red_pin
private

Definition at line 32 of file DiscreteRGBLed.h.

Referenced by hw_init(), and hw_set_rgb().

◆ red_pin_number

uint16_t DiscreteRGBLed::red_pin_number
private

Definition at line 36 of file DiscreteRGBLed.h.

Referenced by hw_init().


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