mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_SerialLED: add support for NeoPixelRGB via set_num_neopixel_rgb()
This commit is contained in:
1 parent
9ff3d21c20
commit
c91ca2d87a
2 files changed
+13
-1
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user