|
|
|
@ -87,7 +87,7 @@ void RCOutput::push(void)
@@ -87,7 +87,7 @@ void RCOutput::push(void)
|
|
|
|
|
/*
|
|
|
|
|
Serial LED emulation |
|
|
|
|
*/ |
|
|
|
|
bool RCOutput::set_neopixel_num_LEDs(const uint16_t chan, uint8_t num_leds) |
|
|
|
|
bool RCOutput::set_serial_led_num_LEDs(const uint16_t chan, uint8_t num_leds, output_mode mode, uint16_t clock_mask) |
|
|
|
|
{ |
|
|
|
|
if (chan > 15 || num_leds > 64) { |
|
|
|
|
return false; |
|
|
|
@ -100,7 +100,7 @@ bool RCOutput::set_neopixel_num_LEDs(const uint16_t chan, uint8_t num_leds)
@@ -100,7 +100,7 @@ bool RCOutput::set_neopixel_num_LEDs(const uint16_t chan, uint8_t num_leds)
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RCOutput::set_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t red, uint8_t green, uint8_t blue) |
|
|
|
|
void RCOutput::set_serial_led_rgb_data(const uint16_t chan, int8_t led, uint8_t red, uint8_t green, uint8_t blue) |
|
|
|
|
{ |
|
|
|
|
if (chan > 15) { |
|
|
|
|
return; |
|
|
|
@ -108,7 +108,7 @@ void RCOutput::set_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t re
@@ -108,7 +108,7 @@ void RCOutput::set_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t re
|
|
|
|
|
SITL::SITL *sitl = AP::sitl(); |
|
|
|
|
if (led == -1) { |
|
|
|
|
for (uint8_t i=0; i < sitl->led.num_leds[chan]; i++) { |
|
|
|
|
set_neopixel_rgb_data(chan, i, red, green, blue); |
|
|
|
|
set_serial_led_rgb_data(chan, i, red, green, blue); |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -122,7 +122,7 @@ void RCOutput::set_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t re
@@ -122,7 +122,7 @@ void RCOutput::set_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t re
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RCOutput::neopixel_send(void) |
|
|
|
|
void RCOutput::serial_led_send(const uint16_t chan) |
|
|
|
|
{ |
|
|
|
|
SITL::SITL *sitl = AP::sitl(); |
|
|
|
|
if (sitl) { |
|
|
|
|