annotate light8/io.py @ 59:001646cd5349

all mousewheel events everywhere will now pass up the tree to be caught by all mousewheel events everywhere will now pass up the tree to be caught by higher widgets. if things get slow, this might be the problem
author drewp
date Tue, 09 Jul 2002 07:36:29 +0000
parents 032b2b67bc10
children 177e9ba0b4a7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
7dbe8067acea fixed bug with channel levels not displaying
drewp
parents: 12
diff changeset
1 from parport import *
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
2
29
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
3 class ParportDMX:
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
4 def __init__(self, dummy=1, dimmers=68):
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 29
diff changeset
5 self.dimmers = dimmers
29
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
6 self.dummy = dummy
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
7 if not dummy:
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
8 getparport()
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
9 def sendlevels(self, levels):
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
10 if self.dummy: return
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
11 levels = list(levels) + [0]
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
12 # if levels[14] > 0: levels[14] = 100 # non-dim
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
13 outstart()
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 29
diff changeset
14 for p in range(1, self.dimmers + 2):
29
f595fdd4c548 minor cleanups, convert parallel port controller to a class
dmcc
parents: 16
diff changeset
15 outbyte(levels[p-1]*255 / 100)