qmsk/dmx/web.py
changeset 82 b5878197d017
parent 80 5254ba612630
child 83 136e210fce82
equal deleted inserted replaced
81:6f1e9a5ac874 82:b5878197d017
   149         super(DMXWebApplication, self).__init__(**opts)
   149         super(DMXWebApplication, self).__init__(**opts)
   150 
   150 
   151         self.dmx = dmx
   151         self.dmx = dmx
   152 
   152 
   153     def dmx_color (self, r, g, b, a=255) :
   153     def dmx_color (self, r, g, b, a=255) :
   154         for c in (1, 30) :
   154         # Stairville LED Par56
   155             # XXX: separate commands... each one flushes...
   155         self.dmx[1] = (0, r, g, b, 0)
   156             self.dmx[c + 0:c + 26] = (r, g, b)
       
   157             self.dmx[c + 27] = (0, a)
       
   158 
   156 
       
   157         # 4ch dimmer
       
   158         self.dmx[5] = (a, a, a, a)
       
   159 
       
   160         # American DJ - Mega Tri 60 - Mode 2
       
   161         self.dmx[10] = (r, g, b, 0, a)