Skip to content

Commit

Permalink
AP_Notify: support set_num_neopixel_rgb()
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Sep 29, 2023
1 parent b8ec902 commit 3b7df98
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libraries/AP_Notify/NeoPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ uint16_t NeoPixel::init_ports()

for (uint16_t chan=0; chan<16; chan++) {
if ((1U<<chan) & mask) {
led->set_num_neopixel(chan+1, (pNotify->get_led_len()),
(pNotify->get_led_type() & AP_Notify::Notify_LED_NeoPixel) ? false
: (pNotify->get_led_type() & AP_Notify::Notify_LED_NeoPixelRGB));
if (pNotify->get_led_type() & AP_Notify::Notify_LED_NeoPixel) {
led->set_num_neopixel(chan+1, pNotify->get_led_len());
} else if (pNotify->get_led_type() & AP_Notify::Notify_LED_NeoPixelRGB) {
led->set_num_neopixel_rgb(chan+1, pNotify->get_led_len());
}
}
}

Expand Down

0 comments on commit 3b7df98

Please sign in to comment.