diff --git a/libraries/AP_HAL_SITL/RCOutput.cpp b/libraries/AP_HAL_SITL/RCOutput.cpp index ea23004899..f4ae7b7db2 100644 --- a/libraries/AP_HAL_SITL/RCOutput.cpp +++ b/libraries/AP_HAL_SITL/RCOutput.cpp @@ -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) 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 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 } } -void RCOutput::neopixel_send(void) +void RCOutput::serial_led_send(const uint16_t chan) { SITL::SITL *sitl = AP::sitl(); if (sitl) { diff --git a/libraries/AP_HAL_SITL/RCOutput.h b/libraries/AP_HAL_SITL/RCOutput.h index b31b6fb594..a4c358dde0 100644 --- a/libraries/AP_HAL_SITL/RCOutput.h +++ b/libraries/AP_HAL_SITL/RCOutput.h @@ -21,9 +21,9 @@ public: /* Serial LED emulation */ - bool set_neopixel_num_LEDs(const uint16_t chan, uint8_t num_leds) override; - void set_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t red, uint8_t green, uint8_t blue) override; - void neopixel_send(void) override; + bool set_serial_led_num_LEDs(const uint16_t chan, uint8_t num_leds, output_mode mode = MODE_PWM_NONE, uint16_t clock_mask = 0) override; + void set_serial_led_rgb_data(const uint16_t chan, int8_t led, uint8_t red, uint8_t green, uint8_t blue) override; + void serial_led_send(const uint16_t chan) override; private: SITL_State *_sitlState;