view light8/io.py @ 51:71489bb71528

- Meet Fader. He is going to grow up and be a crossfader some day - Meet Fader. He is going to grow up and be a crossfader some day (tomarrow) - Tkinter -> Tix so we can use ScrolledListBox which has a command - Some improvements to Cue - Cues need to specify their final values - Cues are imported by subs. This should be fixed for style points. - Some other cleanups
author dmcc
date Sun, 07 Jul 2002 15:40:45 +0000
parents f595fdd4c548
children 032b2b67bc10
line wrap: on
line source

from parport import *

class ParportDMX:
    def __init__(self, dummy=1, dimmers=68):
        self.dummy = dummy
        if not dummy:
            getparport()
    def sendlevels(self, levels):
        if self.dummy: return
        levels = list(levels) + [0]
        # if levels[14] > 0: levels[14] = 100 # non-dim
        outstart()
        for p in range(1, dimmers + 2):
            outbyte(levels[p-1]*255 / 100)