AP_SerialLED: add support for NeoPixelRGB via set_num_neopixel_rgb()

This commit is contained in:
Andy Piper authored and Andrew Tridgell committed 2023-10-04 18:06:17 +11:00
1 parent 9ff3d21c20
commit c91ca2d87a
2 files changed
+13 -1

No files matched your search

+9
View File
@@ -36,6 +36,15 @@ bool AP_SerialLED::set_num_neopixel(uint8_t chan, uint8_t num_leds)
return false;
}
// set number of NeoPixels per pin in RGB mode
bool AP_SerialLED::set_num_neopixel_rgb(uint8_t chan, uint8_t num_leds)
{
if (chan >= 1 && chan <= 16 && num_leds <= AP_SERIALLED_MAX_LEDS) {
return hal.rcout->set_serial_led_num_LEDs(chan-1, num_leds, AP_HAL::RCOutput::MODE_NEOPIXELRGB);
}
return false;
}
// set number of ProfiLEDs per pin
bool AP_SerialLED::set_num_profiled(uint8_t chan, uint8_t num_leds)
{