Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftpatchEditor #469

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

SoftpatchEditor #469

wants to merge 29 commits into from

Conversation

offtools
Copy link
Contributor

bildschirmfoto-qlc-softpatch
Hi,

I wrote a tool which implements softpatching, It's a proposal and I'm aware as it extends the Universe class and also writing a patch table into the saved doc files it needs to be discussed.
I'm also aware that I'm better in doing light than writing code for a lighting software :), there are more elegant solutions possible I guess.

Short history what I've done:
I first implemented the softpatch by changing the Addresses of the Fixtures. The softpatch was working on Doc level. This worked but had some disadvantages:

  1. It was not possible to reset a patch to 1:1.
  2. It was not possible to patch to multiple output channels.
  3. No possiblity to unpatch a channel

Out of that disadvantages I decided to implement the patch stuff on universe level by adding another value array (Universe::m_patchedValues), where the indecies corresponds to your patch. The values of this new array are applied after postGM are applied and now dumped to the output plugin instead of postGM. postGM is just used inside QLC+ to notify Simpledesk and the Monitor about the changes. That means If you patch a channel, all QLC+ internal stuff (channel sliders, cues, simpledesk, monitor ...) stays like it is, just the output changes, no need to memorize new channels, when changing something ... (I like if the first left backlight has channel 1 all over the world :))

The patch on universe levels allows to save the patch inside the doc. There should be no compatiblity problems, except the patch is ignored in older version.
You can patch to multiple output channels (If you have two lamps plugged on the same dimmer later in a other venue separated on two dimmers, this comes quite handy).
It allows you unpatch channels (blocking output of a fixture)

There is one big disadvantage of this implementation, which follows out of that, what I was writing before: It "bypasses" the Monitor. The Monitor doesnt show the real output of QLC+. If you test it you should keep that in mind. I was using Artnet and OLA to monitor the output while testing. Anyway in most cases (except bugs) I think this is the wanted behaviour, patch your output channels, test them, forget them and work with your internal channels. For unpatched channels which still shows output in the monitor I will add some changes later to make this clear (graying them out or something like that).

thatswhy TODO for me:
*mark patched channels in the monitor
*gray out unpatched channels in the monitor
*write only patched channels into doc (not the complete universe)

Another issue could be performance, I tried to minimize the produced overhead and I'm not sure how much that matters.

PS:

The PR also includes removal of the Doc::moveFixture, which is not necessary, because the Fixtures sending changes to doc by itself. Hope I did not miss something there. Anyway, this change does not depend to Softpatch Editor stuff. Changing the Universe of a fixture still contains a bug in SimpleDesk. It is updated/displayed correctly only after doc is saved and reloaded.

*implemented fixture tree including SpinButton column for new Addresses
*Channels are chanels on accept
*bug: still bug in SimpleDesk, not updated correctly (crashing)
simpledesk and consolechannel)
*check for overlapping channels added, overlapping channels marked red,
Warning Dialog added
universe with the Fixturemanager (Properties Dialog)
instead of GMValues, GMValues stay internal
provides:
*patch saved in qxw files
*reset patch / one to one patch
*unpatch channels by assigning channel 0 in SoftpatchEditor

Todo:
*Gui improvements for patching multiple channels per dimmer
*Notification in FixtureManager that Address is patched
*Tests
 *implemented patch to multiple channels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant