mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 12:43:33 +08:00
delete member value initialization in constructor.
This commit is contained in:
@@ -118,7 +118,6 @@ RGBLED_PWM::RGBLED_PWM() :
|
|||||||
_r(0),
|
_r(0),
|
||||||
_g(0),
|
_g(0),
|
||||||
_b(0),
|
_b(0),
|
||||||
_brightness(1.0f),
|
|
||||||
_running(false),
|
_running(false),
|
||||||
_should_run(true)
|
_should_run(true)
|
||||||
{
|
{
|
||||||
@@ -208,8 +207,8 @@ RGBLED_PWM::led()
|
|||||||
LedControlData led_control_data;
|
LedControlData led_control_data;
|
||||||
|
|
||||||
if (_led_controller.update(led_control_data) == 1) {
|
if (_led_controller.update(led_control_data) == 1) {
|
||||||
uint8_t brightness = led_control_data.leds[0].brightness;
|
uint8_t brightness = led_control_data.leds[0].brightness;
|
||||||
|
|
||||||
switch (led_control_data.leds[0].color) {
|
switch (led_control_data.leds[0].color) {
|
||||||
case led_control_s::COLOR_RED:
|
case led_control_s::COLOR_RED:
|
||||||
_r = brightness; _g = 0; _b = 0;
|
_r = brightness; _g = 0; _b = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user