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: