Skip to content

Add toggle to prevent pixel color data split across two artnet universes to support certain ArtNet Controller #657

@gllmAR

Description

@gllmAR

Feature request

What problem does this feature solve?

Support for Artnet to SPI/DMX pixel light controller in the family of the BC-204.

Currently, the RGB data format in the HyperHDR software splits pixel color data across two universes which can look as follows:

508:R
509:G
510:B
511:R
512:G
001:B
002:R
003:G
004:B

However, for some ArtNet controllers, the expected formatting requires pixel data to always start at the beginning of a universe which should look like:

508:R
509:G
510:B
511:X not used
512:X not used 
001:R
002:G
003:B
004:R
005:G
006:B

This discrepancy can cause issues with compatibility and expected behavior for specific ArtNet controllers.
Adding a toggle in the GUI to switch between the two data formats would address this problem.

What does the proposed API look like?

A new boolean toggle in the GUI named something like "Prevent Pixel Data Splitting Across Universes" or similar.

How should this be implemented in your opinion?

Add a new boolean toggle in the GUI settings for the ArtNet Controller.
This toggle should be linked to the backend logic that determines the data format for the ArtNet packet.
When the toggle is active, ensure that the data does not split across two universes, following the desired format.

The following code snippet supports the new behavior: (LedDeviceUdpArtNet.cpp)

for (unsigned int ledIdx = 0; ledIdx < _ledRGBCount; ledIdx++)
{
	if (_restartColorIndexAtUniverseIncrement)
	{
		// Check if there's enough space in the current universe for all channels of the next LED
    	if (dmxIdx + _artnet_channelsPerFixture > DMX_MAX)
    	{
        	// Prepare and send the current universe
        	prepare(thisUniverse, _artnet_seq, dmxIdx);
        	retVal &= writeBytes(18 + qMin(dmxIdx, DMX_MAX), artnet_packet.raw);

        	// Move to the next universe and reset the DMX index
        	memset(artnet_packet.raw, 0, sizeof(artnet_packet.raw));
        	thisUniverse++;
        	dmxIdx = 0;
    	}
	}
}

Are you willing to work on this yourself?

Yes,

I would need some insight on how to link the bool logic to the gui and also help to name the variable

btw, amazing software :)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions