AP_HAL: Add support for NeoPixelRGB

This commit is contained in:
Andy Piper 2023-09-28 21:48:50 +01:00 committed by Andrew Tridgell
parent f72bfcc373
commit 4c911dce68
2 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,7 @@ const char* AP_HAL::RCOutput::get_output_mode_string(enum output_mode out_mode)
case MODE_PWM_DSHOT1200:
return "DS1200";
case MODE_NEOPIXEL:
case MODE_NEOPIXELRGB:
return "NeoP";
case MODE_PROFILED:
return "ProfiLED";

View File

@ -215,6 +215,7 @@ public:
MODE_PWM_DSHOT1200,
MODE_NEOPIXEL, // same as MODE_PWM_DSHOT at 800kHz but it's an LED
MODE_PROFILED, // same as MODE_PWM_DSHOT using separate clock and data
MODE_NEOPIXELRGB, // same as MODE_NEOPIXEL but RGB ordering
};
// true when the output mode is of type dshot
// static to allow use in the ChibiOS thread stuff
@ -223,6 +224,7 @@ public:
static bool is_led_protocol(const enum output_mode mode) {
switch (mode) {
case MODE_NEOPIXEL:
case MODE_NEOPIXELRGB:
case MODE_PROFILED:
return true;
default:
@ -351,7 +353,7 @@ public:
and led number. A led number of -1 means all LEDs. LED 0 is the first LED
*/
virtual void set_serial_led_rgb_data(const uint16_t chan, int8_t led, uint8_t red, uint8_t green, uint8_t blue) {}
/*
trigger send of serial led
*/