Skip to content

Commit 0d18fec

Browse files
committed
Improve
1 parent 039e787 commit 0d18fec

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

fixture.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,14 @@ def process_channels(self, dmx_mode_channels, channels):
883883
):
884884
new_channel["cached_channels"][str(dmx_channel.dmx_break)] = {}
885885
for ch_of in new_channel.offsets:
886-
new_channel["cached_channels"][str(dmx_channel.dmx_break)][
887-
str(ch_of)
888-
] = None
886+
if ch_of > 0:
887+
new_channel["cached_channels"][str(dmx_channel.dmx_break)][
888+
str(ch_of)
889+
] = None
890+
# channel offsets are not good, we will need channel node and store final value
891+
# together with attribute, physical value and slot index value
892+
# this is needed because many channels operate together (pan+tilt, r+g+b,...)
893+
print("adding channel to cached", ch_of)
889894

890895
else:
891896
# virtual channels are 8 bit now
@@ -1282,12 +1287,11 @@ def render(self, skip_cache=False, current_frame=None):
12821287
# check if channel or other mode dependent channels are the same as in the cache
12831288
for cached_break, cached_channels in channel["cached_channels"].items():
12841289
for cached_channel in cached_channels.keys():
1285-
print("channel", cached_channel, cached_break)
12861290
store_val = dmx_data[int(cached_break)].get(
12871291
int(cached_channel), None
12881292
)
12891293
print(
1290-
f"{channel.attribute}: {store_val=} {cached_channels[cached_channel]=}"
1294+
f"{channel.attribute}: {store_val=} {cached_channels[cached_channel]=} {cached_channel=}"
12911295
)
12921296
if store_val != cached_channels[cached_channel]:
12931297
channel_cached_already = False
@@ -1851,6 +1855,7 @@ def updateRGB(
18511855
if geometry is not None:
18521856
geometry = geometry.replace(" ", "_")
18531857
DMX_Log.log.info(("color change for geometry", geometry, colors))
1858+
print("colors", colors)
18541859
colors = [
18551860
c if c is not None else 0 for c in colors
18561861
] # replace None with 0, can happen if someone maps colors across geometries...

0 commit comments

Comments
 (0)