PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
RGBLED_NPC5623C (int bus, int rgbled) | |
virtual | ~RGBLED_NPC5623C () |
virtual int | init () |
virtual int | probe () |
Private Member Functions | |
void | Run () override |
Main loop function. More... | |
int | send_led_rgb () |
Send RGB PWM settings to LED driver according to current color and brightness. More... | |
void | update_params () |
int | write (uint8_t reg, uint8_t data) |
Private Attributes | |
float | _brightness {1.0f} |
float | _max_brightness {1.0f} |
uint8_t | _r {0} |
uint8_t | _g {0} |
uint8_t | _b {0} |
volatile bool | _running {false} |
volatile bool | _should_run {true} |
bool | _leds_enabled {true} |
uORB::Subscription | _parameter_update_sub {ORB_ID(parameter_update)} |
LedController | _led_controller |
Definition at line 64 of file rgbled_ncp5623c.cpp.
RGBLED_NPC5623C::RGBLED_NPC5623C | ( | int | bus, |
int | rgbled | ||
) |
Definition at line 107 of file rgbled_ncp5623c.cpp.
Referenced by rgbled_ncp5623c_main().
|
virtual |
Definition at line 113 of file rgbled_ncp5623c.cpp.
References _running, _should_run, and counter.
|
virtual |
Definition at line 135 of file rgbled_ncp5623c.cpp.
References _running, ToneAlarmInterface::init(), OK, and update_params().
|
virtual |
Definition at line 153 of file rgbled_ncp5623c.cpp.
References NCP5623_LED_CURRENT, and write().
|
overrideprivate |
Main loop function.
Definition at line 164 of file rgbled_ncp5623c.cpp.
References _b, _brightness, _g, _led_controller, _parameter_update_sub, _r, _running, _should_run, LedControlDataSingle::brightness, LedControlDataSingle::color, uORB::Subscription::copy(), LedControlData::leds, LedController::maximum_update_interval(), NCP5623_LED_BRIGHT, send_led_rgb(), LedController::update(), update_params(), and uORB::Subscription::updated().
|
private |
Send RGB PWM settings to LED driver according to current color and brightness.
Definition at line 235 of file rgbled_ncp5623c.cpp.
References _b, _brightness, _g, _max_brightness, _r, msg, NCP5623_LED_CURRENT, NCP5623_LED_PWM0, NCP5623_LED_PWM1, and NCP5623_LED_PWM2.
Referenced by Run().
|
private |
Definition at line 250 of file rgbled_ncp5623c.cpp.
References _max_brightness, param_find(), and param_get().
Referenced by init(), and Run().
|
private |
Definition at line 124 of file rgbled_ncp5623c.cpp.
References msg.
Referenced by probe().
|
private |
Definition at line 80 of file rgbled_ncp5623c.cpp.
Referenced by Run(), and send_led_rgb().
|
private |
Definition at line 75 of file rgbled_ncp5623c.cpp.
Referenced by Run(), and send_led_rgb().
|
private |
Definition at line 79 of file rgbled_ncp5623c.cpp.
Referenced by Run(), and send_led_rgb().
|
private |
Definition at line 87 of file rgbled_ncp5623c.cpp.
Referenced by Run().
|
private |
Definition at line 83 of file rgbled_ncp5623c.cpp.
|
private |
Definition at line 76 of file rgbled_ncp5623c.cpp.
Referenced by send_led_rgb(), and update_params().
|
private |
Definition at line 85 of file rgbled_ncp5623c.cpp.
Referenced by Run().
|
private |
Definition at line 78 of file rgbled_ncp5623c.cpp.
Referenced by Run(), and send_led_rgb().
|
private |
Definition at line 81 of file rgbled_ncp5623c.cpp.
Referenced by init(), Run(), and ~RGBLED_NPC5623C().
|
private |
Definition at line 82 of file rgbled_ncp5623c.cpp.
Referenced by Run(), and ~RGBLED_NPC5623C().