Browse Source

AP_HAL_SITL: update function names

zr-v5.1
Peter Hall 5 years ago committed by Andrew Tridgell
parent
commit
3002089396
  1. 8
      libraries/AP_HAL_SITL/RCOutput.cpp
  2. 6
      libraries/AP_HAL_SITL/RCOutput.h

8
libraries/AP_HAL_SITL/RCOutput.cpp

@ -87,7 +87,7 @@ void RCOutput::push(void)
/* /*
Serial LED emulation 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) { if (chan > 15 || num_leds > 64) {
return false; return false;
@ -100,7 +100,7 @@ bool RCOutput::set_neopixel_num_LEDs(const uint16_t chan, uint8_t num_leds)
return false; 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) { if (chan > 15) {
return; 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(); SITL::SITL *sitl = AP::sitl();
if (led == -1) { if (led == -1) {
for (uint8_t i=0; i < sitl->led.num_leds[chan]; i++) { 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; 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(); SITL::SITL *sitl = AP::sitl();
if (sitl) { if (sitl) {

6
libraries/AP_HAL_SITL/RCOutput.h

@ -30,9 +30,9 @@ public:
/* /*
Serial LED emulation Serial LED emulation
*/ */
bool set_neopixel_num_LEDs(const uint16_t chan, uint8_t num_leds) 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_neopixel_rgb_data(const uint16_t chan, int8_t led, uint8_t red, uint8_t green, uint8_t blue) 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 neopixel_send(void) override; void serial_led_send(const uint16_t chan) override;
private: private:
SITL_State *_sitlState; SITL_State *_sitlState;

Loading…
Cancel
Save