Changeset - 9a03605121b7
[Not reviewed]
default
0 1 0
Drew Perttula - 18 years ago 2007-06-15 16:51:14
drewp@bigasterisk.com
fix usb dmx levels off by one
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/io/__init__.py
Show inline comments
 
@@ -72,7 +72,10 @@ class UsbDMX(BaseIO):
 
    def sendlevels(self, levels):
 
        if self.dummy:
 
            return
 
        packet = ''.join([chr(int(lev * 255 / 100)) for lev in levels]) + "\x55"
 
        # I was outputting on 76 and it was turning on the light at
 
        # dmx75. So I added the 0 byte.
 
        packet = '\x00' + ''.join([chr(int(lev * 255 / 100)) 
 
                                  for lev in levels]) + "\x55"
 
        self._dmx().write(packet)
 

	
 
class SerialPots(BaseIO):
0 comments (0 inline, 0 general)