Add Entec RGBW
This commit is contained in:
parent
517c7df66a
commit
ef3c8d9a2c
2 changed files with 16 additions and 5 deletions
15
dmx.py
15
dmx.py
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue