mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL_SITL: update function names
This commit is contained in:
parent
e1c2977adc
commit
3002089396
@ -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) {
|
||||
|
@ -30,9 +30,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;
|
||||
|
Loading…
Reference in New Issue
Block a user