add support for Cameo Pixbar 600 Pro
This commit is contained in:
parent
8ad7721f0f
commit
6743efb059
3 changed files with 65 additions and 0 deletions
|
@ -31,6 +31,9 @@ class DMXQueue:
|
|||
self.sacn.start()
|
||||
self.sacn.activate_output(self.config.universe)
|
||||
|
||||
for light in self.lights:
|
||||
self.log.info(f" LIGHT: {light}")
|
||||
|
||||
self.sacn[self.config.universe].multicast = self.config.multicast
|
||||
if not self.config.multicast:
|
||||
self.sacn[self.config.universe].destination = self.config.target
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from .cameo_pixbar_600pro import CameoPixbar600Pro
|
||||
from .ignition_wal_l710 import IgnitionWALL710
|
||||
from .pulsar_chromaflood_200 import PulsarChromaflood200
|
||||
from .sheds_30w_cob_rgb import Sheds30WCOBRGB
|
||||
|
|
61
lights/cameo_pixbar_600pro.py
Normal file
61
lights/cameo_pixbar_600pro.py
Normal file
|
@ -0,0 +1,61 @@
|
|||
from colorsys import hsv_to_rgb
|
||||
|
||||
from .common import BaseDMXLight
|
||||
|
||||
|
||||
class CameoPixbar600Pro(BaseDMXLight):
|
||||
name = "Cameo Pixbar 600 Pro (78-Channel Mode)"
|
||||
|
||||
def _dump(self):
|
||||
return self.address, [
|
||||
self.intensity,
|
||||
0, # strobe
|
||||
*[
|
||||
self.red,
|
||||
self.green,
|
||||
self.blue,
|
||||
self.white,
|
||||
0, # amber
|
||||
0, # uv
|
||||
]
|
||||
* 12,
|
||||
0, # macro
|
||||
0, # colour correction
|
||||
0, # auto mode
|
||||
0, # auto mode speed
|
||||
]
|
||||
|
||||
def rainbow(self, idx, angle, number_of_lights, intensity, brightness):
|
||||
degrees_per_light = 360 / number_of_lights
|
||||
my_degrees_dec = (angle + (idx * degrees_per_light)) % 360
|
||||
degrees_per_pixel = degrees_per_light / 12
|
||||
|
||||
dmx_values = [
|
||||
brightness,
|
||||
0, # strobe
|
||||
]
|
||||
|
||||
for pixel in range(12):
|
||||
r, g, b = hsv_to_rgb(
|
||||
(my_degrees_dec + (pixel * degrees_per_pixel)) / 360,
|
||||
1,
|
||||
intensity / 100,
|
||||
)
|
||||
|
||||
dmx_values += [
|
||||
int(r * 255),
|
||||
int(g * 255),
|
||||
int(b * 255),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
]
|
||||
|
||||
dmx_values += [
|
||||
0, # macro
|
||||
0, # colour correction
|
||||
0, # auto mode
|
||||
0, # auto mode speed
|
||||
]
|
||||
|
||||
return self.address, dmx_values
|
Loading…
Add table
Reference in a new issue