PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
RGBLED_PWM () | |
virtual | ~RGBLED_PWM () |
int | init () |
int | status () |
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... | |
int | get (bool &on, bool &powersave, uint8_t &r, uint8_t &g, uint8_t &b) |
Private Attributes | |
uint8_t | _r {0} |
uint8_t | _g {0} |
uint8_t | _b {0} |
volatile bool | _running {false} |
volatile bool | _should_run {true} |
LedController | _led_controller |
Definition at line 48 of file rgbled_pwm.cpp.
RGBLED_PWM::RGBLED_PWM | ( | ) |
Definition at line 86 of file rgbled_pwm.cpp.
Referenced by rgbled_pwm_main().
|
virtual |
Definition at line 91 of file rgbled_pwm.cpp.
References _running, _should_run, and counter.
|
private |
int RGBLED_PWM::init | ( | ) |
Definition at line 102 of file rgbled_pwm.cpp.
References _running, led_pwm_servo_init(), OK, and send_led_rgb().
|
overrideprivate |
Main loop function.
Definition at line 140 of file rgbled_pwm.cpp.
References _b, _g, _led_controller, _r, _running, _should_run, LedControlDataSingle::brightness, LedControlDataSingle::color, LedControlData::leds, LedController::maximum_update_interval(), send_led_rgb(), and LedController::update().
|
private |
Send RGB PWM settings to LED driver according to current color and brightness.
Definition at line 198 of file rgbled_pwm.cpp.
References _b, _g, _r, led_pwm_servo_set(), and OK.
Referenced by init(), and Run().
int RGBLED_PWM::status | ( | ) |
Definition at line 117 of file rgbled_pwm.cpp.
References OK.
|
private |
Definition at line 61 of file rgbled_pwm.cpp.
Referenced by get(), Run(), and send_led_rgb().
|
private |
Definition at line 60 of file rgbled_pwm.cpp.
Referenced by get(), Run(), and send_led_rgb().
|
private |
Definition at line 66 of file rgbled_pwm.cpp.
Referenced by Run().
|
private |
Definition at line 59 of file rgbled_pwm.cpp.
Referenced by get(), Run(), and send_led_rgb().
|
private |
Definition at line 63 of file rgbled_pwm.cpp.
Referenced by init(), Run(), and ~RGBLED_PWM().
|
private |
Definition at line 64 of file rgbled_pwm.cpp.
Referenced by Run(), and ~RGBLED_PWM().