Add Entec RGBW

This commit is contained in:
Stefan Bethke 2024-12-23 10:40:23 -05:00
commit ef3c8d9a2c
2 changed files with 16 additions and 5 deletions

15
dmx.py
View file

@ -21,9 +21,13 @@ class RGB:
def rgb(self, color):
(r, g, b) = color
self.dmx.set(self.slot + self.offset + 0, ledlog(r))
self.dmx.set(self.slot + self.offset + 1, ledlog(g))
self.dmx.set(self.slot + self.offset + 2, ledlog(b))
try:
self.dmx.set(self.slot + self.offset + 0, ledlog(r))
self.dmx.set(self.slot + self.offset + 1, ledlog(g))
self.dmx.set(self.slot + self.offset + 2, ledlog(b))
except Exception as e:
print(f'slot={self.slot}, offset={self.offset}')
raise(e)
class Bar252(RGB):
@ -57,6 +61,11 @@ class ZhennbyPar(RGB):
dmx.set(self.slot + 6, 0)
class Entec6RGBW(RGB):
def __init__(self, dmx, slot=1):
super(Entec6RGBW, self).__init__(dmx, slot)
class DMX:
def __init__(self, host, port=0x1936, universe=1, maxchan=512):
self._host = host