# HG changeset patch # User Drew Perttula # Date 2007-06-15 16:51:14 # Node ID 9a03605121b7eb054136838b62bd1173a495aef0 # Parent 87b14afaa00ebe25392f7a16e3443f5abfa91236 fix usb dmx levels off by one diff --git a/light9/io/__init__.py b/light9/io/__init__.py --- a/light9/io/__init__.py +++ b/light9/io/__init__.py @@ -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):