Mercurial > code > home > repos > light9
changeset 364:9a03605121b7
fix usb dmx levels off by one
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Fri, 15 Jun 2007 16:51:14 +0000 |
parents | 87b14afaa00e |
children | d6a729e3c31d |
files | light9/io/__init__.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/io/__init__.py Sat Jun 16 16:02:11 2007 +0000 +++ b/light9/io/__init__.py Fri Jun 15 16:51:14 2007 +0000 @@ -72,7 +72,10 @@ 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):