Skip to content

Commit

Permalink
Merge pull request #100 from hideakitai/fix/panic-in-forwardArtDmxDat…
Browse files Browse the repository at this point in the history
…aToFastLED

Fix: panic in forwardArtDmxDataToFastLed
  • Loading branch information
hideakitai authored May 19, 2024
2 parents 7a3dc43 + 97839ad commit 4360cf8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Artnet/Receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Receiver_
}
void forwardArtDmxDataToFastLED(uint16_t universe, CRGB* leds, uint16_t num)
{
this->subscribeArtDmxUniverse(universe, [&](const uint8_t* data, const uint16_t size, const ArtDmxMetadata &metadata, const RemoteInfo &remote) {
this->subscribeArtDmxUniverse(universe, [leds, num](const uint8_t* data, const uint16_t size, const ArtDmxMetadata &, const RemoteInfo &) {
size_t n;
if (num <= size / 3) {
// OK: requested number of LEDs is less than received data size
Expand Down Expand Up @@ -296,13 +296,11 @@ class Receiver_
void sendArtPollReply(const RemoteInfo &remote)
{
const IPAddress my_ip = this->localIP();
const IPAddress my_subnet = this->subnetMask();
uint8_t my_mac[6];
this->macAddress(my_mac);

for (const auto &cb_pair : this->callback_art_dmx_universes) {
art_poll_reply::Packet reply = art_poll_reply::generatePacketFrom(my_ip, my_mac, cb_pair.first, this->art_poll_reply_config);
static const IPAddress local_broadcast_addr = IPAddress((uint32_t)my_ip | ~(uint32_t)my_subnet);
this->stream->beginPacket(remote.ip, DEFAULT_PORT);
this->stream->write(reply.b, sizeof(art_poll_reply::Packet));
this->stream->endPacket();
Expand Down

0 comments on commit 4360cf8

Please sign in to comment.