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

#include <RCOutputRGBLed.h>

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

Public Member Functions

 RCOutputRGBLed (uint8_t red_channel, uint8_t green_channel, uint8_t blue_channel, uint8_t led_off, uint8_t led_full, uint8_t led_medium, uint8_t led_dim)
 
 RCOutputRGBLed (uint8_t red_channel, uint8_t green_channel, uint8_t blue_channel)
 
- 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 () override
 
virtual bool hw_set_rgb (uint8_t red, uint8_t green, uint8_t blue) override
 
virtual uint16_t get_duty_cycle_for_color (const uint8_t color, const uint16_t usec_period) const
 
- 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

uint8_t _red_channel
 
uint8_t _green_channel
 
uint8_t _blue_channel
 

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 5 of file RCOutputRGBLed.h.

Constructor & Destructor Documentation

◆ RCOutputRGBLed() [1/2]

RCOutputRGBLed::RCOutputRGBLed ( uint8_t  red_channel,
uint8_t  green_channel,
uint8_t  blue_channel,
uint8_t  led_off,
uint8_t  led_full,
uint8_t  led_medium,
uint8_t  led_dim 
)

Definition at line 36 of file RCOutputRGBLed.cpp.

◆ RCOutputRGBLed() [2/2]

RCOutputRGBLed::RCOutputRGBLed ( uint8_t  red_channel,
uint8_t  green_channel,
uint8_t  blue_channel 
)

Definition at line 30 of file RCOutputRGBLed.cpp.

Member Function Documentation

◆ get_duty_cycle_for_color()

uint16_t RCOutputRGBLed::get_duty_cycle_for_color ( const uint8_t  color,
const uint16_t  usec_period 
) const
protectedvirtual

Reimplemented in RCOutputRGBLedInverted.

Definition at line 56 of file RCOutputRGBLed.cpp.

Referenced by hw_set_rgb(), and RCOutputRGBLedInverted::RCOutputRGBLedInverted().

Here is the caller graph for this function:

◆ hw_init()

bool RCOutputRGBLed::hw_init ( void  )
overrideprotectedvirtual

Implements RGBLed.

Definition at line 47 of file RCOutputRGBLed.cpp.

Here is the call graph for this function:

◆ hw_set_rgb()

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

Implements RGBLed.

Reimplemented in RCOutputRGBLedOff.

Definition at line 67 of file RCOutputRGBLed.cpp.

Referenced by RCOutputRGBLedOff::hw_set_rgb().

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

Member Data Documentation

◆ _blue_channel

uint8_t RCOutputRGBLed::_blue_channel
private

Definition at line 21 of file RCOutputRGBLed.h.

Referenced by hw_init(), and hw_set_rgb().

◆ _green_channel

uint8_t RCOutputRGBLed::_green_channel
private

Definition at line 20 of file RCOutputRGBLed.h.

Referenced by hw_init(), and hw_set_rgb().

◆ _red_channel

uint8_t RCOutputRGBLed::_red_channel
private

Definition at line 19 of file RCOutputRGBLed.h.

Referenced by hw_init(), and hw_set_rgb().


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