Skip to content

Commit

Permalink
try more opendmx sh*t
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Oct 24, 2024
1 parent 22fd0fa commit 611db15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Modules/juce_dmx
21 changes: 12 additions & 9 deletions Source/Interface/interfaces/dmx/DMXInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,22 @@ void DMXInterface::finishSendValues()

GenericScopedLock lock(deviceLock);
if (dmxDevice == nullptr) return;

for (auto& u : universes)

{
if (!u->isDirty && sendOnChange) continue;
hasOneDirty |= u->isDirty;
u->isDirty = false;
GenericScopedLock ulock(universes.getLock());
for (auto& u : universes)
{
if (!u->isDirty && sendOnChange) continue;
hasOneDirty |= u->isDirty;
u->isDirty = false;

if (log) sentUniverses += "\n" + u->toString();
if (log) sentUniverses += "\n" + u->toString();

dmxDevice->setDMXValues(u);
dmxDevice->setDMXValues(u);

Array<uint8> values(u->values.getRawDataPointer(), u->values.size());
dmxInterfaceNotifier.addMessage(new DMXInterfaceEvent(DMXInterfaceEvent::UNIVERSE_SENT, u, values));
Array<uint8> values(u->values.getRawDataPointer(), u->values.size());
dmxInterfaceNotifier.addMessage(new DMXInterfaceEvent(DMXInterfaceEvent::UNIVERSE_SENT, u, values));
}
}

outActivityTrigger->trigger();
Expand Down

0 comments on commit 611db15

Please sign in to comment.