Skip to content

Commit

Permalink
remove unnecessary variables
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-45 committed Jan 23, 2025
1 parent dd30ab4 commit e7cbeb0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 34 deletions.
35 changes: 14 additions & 21 deletions desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,6 @@ def t_desktop_cast(self, shared_buffer=None):
ddp_host = None
artnet_host = None

t_e131_name = self.e131_name # name for e131
t_universe = int(self.universe) # universe start number e131/artnet
t_pixel_count = int(self.pixel_count) # number of pixels e131/artnet
t_packet_priority = int(self.packet_priority) # priority for e131
t_universe_size = int(self.universe_size) # size of each universe e131/artnet
t_channel_offset = int(self.channel_offset) # The channel offset within the universe. e131/artnet
t_channels_per_pixel = int(self.channels_per_pixel) # Channels to use for e131/artnet

"""
Cast devices
"""
Expand Down Expand Up @@ -292,26 +284,27 @@ def send_multicast_images_to_ips(images_buffer, to_ip_addresses):
Utils.update_ddp_list(self.host, ddp_host)

elif t_protocol == 'e131':
e131_host = E131Queue(name=t_e131_name,
e131_host = E131Queue(name=self.e131_name,
ip_address=self.host,
universe=t_universe,
pixel_count=t_pixel_count,
packet_priority=t_packet_priority,
universe_size=t_universe_size,
channel_offset=t_channel_offset,
channels_per_pixel=t_channels_per_pixel,
universe=int(self.universe),
pixel_count=int(self.pixel_count),
packet_priority=int(self.packet_priority),
universe_size=int(self.universe_size),
channel_offset=int(self.channel_offset),
channels_per_pixel=int(self.channels_per_pixel),
blackout=True)

e131_host.activate()

elif t_protocol == 'artnet':
artnet_host = ArtNetQueue(name=t_e131_name,
artnet_host = ArtNetQueue(name=self.e131_name,
ip_address=self.host,
universe=t_universe,
pixel_count=t_pixel_count,
universe_size=t_universe_size,
channel_offset=t_channel_offset,
channels_per_pixel=t_channels_per_pixel)
universe=int(self.universe),
pixel_count=int(self.pixel_count),
universe_size=int(self.universe_size),
channel_offset=int(self.channel_offset),
channels_per_pixel=int(self.channels_per_pixel)
)

artnet_host.activate()

Expand Down
27 changes: 14 additions & 13 deletions media.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,26 +280,27 @@ def send_multicast_images_to_ips(images_buffer, to_ip_addresses):
Utils.update_ddp_list(self.host, ddp_host)

elif t_protocol =='e131':
e131_host = E131Queue(name=t_e131_name,
e131_host = E131Queue(name=self.e131_name,
ip_address=self.host,
universe=t_universe,
pixel_count=t_pixel_count,
packet_priority=t_packet_priority,
universe_size=t_universe_size,
channel_offset=t_channel_offset,
channels_per_pixel=t_channels_per_pixel,
universe=int(self.universe),
pixel_count=int(self.pixel_count),
packet_priority=int(self.packet_priority),
universe_size=int(self.universe_size),
channel_offset=int(self.channel_offset),
channels_per_pixel=int(self.channels_per_pixel),
blackout=True)

e131_host.activate()

elif t_protocol =='artnet':
artnet_host = ArtNetQueue(name=t_e131_name,
artnet_host = ArtNetQueue(name=self.e131_name,
ip_address=self.host,
universe=t_universe,
pixel_count=t_pixel_count,
universe_size=t_universe_size,
channel_offset=t_channel_offset,
channels_per_pixel=t_channels_per_pixel)
universe=int(self.universe),
pixel_count=int(self.pixel_count),
universe_size=int(self.universe_size),
channel_offset=int(self.channel_offset),
channels_per_pixel=int(self.channels_per_pixel)
)

artnet_host.activate()

Expand Down

0 comments on commit e7cbeb0

Please sign in to comment.