xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
530 stars 197 forks source link

Inconsistency in config upload on ILightThat controller #4619

Open PeteMatthews opened 3 weeks ago

PeteMatthews commented 3 weeks ago

TLDR - xLights seems to be applying config constraints non-deterministically, and it's making my head hurt :)

We recently added support for the new Baldrick controller boards from ILightThat (via various vendors). The first version of support appeared in 2024.10, and all was well.

We then finished the sACN and ArtNet support, and added the relevant config for that - This was PRd and accepted into 2024.11. PR - https://github.com/xLightsSequencer/xLights/pull/4570 Note that this PR also contains some support for other features, but it enables sACN and ArtNet.

At the moment, we only support DMX universes that are all evenly sized, and we fix it to 510 in the xLights config upload. We may get smarter about that in future.

As such, I added the AllInputUniversesMustBe510 config constraint. I suspect I've got this wrong, but I assumed this would ensure that if we have 1050 channels, you'd end up with 2 universes at 510 channels, and either 1 of 30 channels, or another 510, with 480 of the channels unused. Either of these would be fine. Entirely prepared to have misunderstood this one :)

Pre-PR testing seemed OK.

However, 2024.11 is now out, and we've had reports that things are not OK.

For instance, I've got a configuration with 120 channels on one of our controllers. Save, close xLights. All good. Open xLights, pick controller, Upload Output - Upload fails. Change config to ArtNet - Upload succeeds. Change config back to DDP - Upload succeeds. Save and restart xLights, attempt upload - Upload fails.

(Incidentally, we don't care which protocol is selected when generating the config. The config generated is the same.)

When it fails, it seems to be failing on the rules check at https://github.com/xLightsSequencer/xLights/blob/master/xLights/controllers/ControllerUploadData.cpp#L1895. The message reported is that there are 120 channels found, which is correct, but shouldn't be causing a problem?

So - Have I screwed up and misunderstood the config constraint? Is there a better way to achieve what I'm after? Have I done something that makes the rule-check inconsistent?

Thanks :)

PeteMatthews commented 1 week ago

FWIW, while this is still a valid issue, I've now worked around the problem in #4630

computergeek1507 commented 1 week ago

The Auto Start Channel Code runs on app startup. The Universe Autosize code appends new universes to the outputs list and uses the last universe as the size. For start channels of models, xLights "pixel packs" it will puts the model start channels right after each other. This can be an issue for controllers that use FastLED library or similar.