fixed universe data size in forward()

master
Hideaki Tai 4 years ago
parent e06539f636
commit 4cde3e955d

@ -433,7 +433,7 @@ namespace arx {
}
#ifdef FASTLED_VERSION
inline void forward(const uint32_t universe, CRGB* leds, const uint16_t num) {
inline void forward(const uint8_t universe, CRGB* leds, const uint16_t num) {
subscribe(universe, [&](const uint8_t* data, const uint16_t size) {
if (size < num * 3) Serial.println(F("ERROR: Too many LEDs to forward"));
for (size_t pixel = 0; pixel < num; ++pixel) {
@ -444,10 +444,6 @@ namespace arx {
}
});
}
inline void forward(const uint8_t net, const uint8_t subnet, const uint8_t universe, CRGB* leds, const uint16_t num) {
uint32_t u = ((uint32_t)net << 8) | ((uint32_t)subnet << 4) | (uint32_t)universe;
forward(u, leds, num);
}
#endif
void shortname(const String& sn) {
short_name = sn;

Loading…
Cancel
Save