Skip to content

Commit

Permalink
Experimental non-standard Art-Net sync
Browse files Browse the repository at this point in the history
  • Loading branch information
troyhacks committed Aug 12, 2024
1 parent 3269c34 commit dc88b26
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion wled00/udp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,8 @@ uint8_t IRAM_ATTR realtimeBroadcast(uint8_t type, IPAddress client, uint16_t len
packet_buffer[9] = 0x52; // ArtSync opcode high byte
packet_buffer[12] = 0x00; // Aux1 - Transmit as 0. This is normally the sequence number in ArtDMX packets.
packet_buffer[13] = 0x00; // Aux2 - Transmit as 0 - this should be 0 anyway in the packet already


#ifdef ARTNET_SYNC_STRICT
WiFiUDP artnetsync;
artnetsync.begin(ETH.localIP(), ARTNET_DEFAULT_PORT);
artnetsync.beginPacket(IPADDR_BROADCAST,ARTNET_DEFAULT_PORT);
Expand All @@ -993,6 +994,12 @@ uint8_t IRAM_ATTR realtimeBroadcast(uint8_t type, IPAddress client, uint16_t len
DEBUG_PRINTLN(F("Art-Net Sync Broadcast returned an error"));
return 1; // borked
}
#else
if (!artnetudp.writeTo(packet_buffer,14, client, ARTNET_DEFAULT_PORT)) {
DEBUG_PRINTLN(F("Art-Net Sync Unicast returned an error"));
return 1; // borked
}
#endif

#ifdef ARTNET_TIMER
packetstotal++;
Expand Down

0 comments on commit dc88b26

Please sign in to comment.