Changeset - 7dbe8067acea
[Not reviewed]
default
0 3 0
drewp - 22 years ago 2002-07-07 06:33:29

fixed bug with channel levels not displaying
fixed bug with channel levels not displaying
moved an import from rsn to io
3 files changed with 10 insertions and 7 deletions:
0 comments (0 inline, 0 general)
light8/io.py
Show inline comments
 

	
 

	
 
from parport import *
 

	
 
DUMMY=1
 

	
 
def init(DUMMY_in):
 
    global DUMMY
 
    if not DUMMY_in:
 
        
 
        getparport()
 
        DUMMY=0
 

	
 
def sendlevels(levels):
 
    if DUMMY: return
 
    levels = list(levels) + [0]
light8/panels.py
Show inline comments
 
@@ -40,29 +40,29 @@ class Console:
 
        else:
 
            print '>>>', str
 
            print eval(str)
 
        self.frame.focus()
 

	
 
class Leveldisplay:
 
    def __init__(self,parent,_oldlevels):
 
        global channel_levels
 
    def __init__(self,parent,_oldlevels,channel_levels):
 
        
 
        frames = (make_frame(parent), make_frame(parent))
 
        channel_levels=[]
 
        channel_levels[:]=[]
 
        for channel in range(1, 69):
 
            f=Frame(frames[channel > 34])
 
            Label(f,text=str(channel), width=3, bg='lightPink', 
 
                font=stdfont, padx=0, pady=0, bd=0, height=1).pack(side='left')
 
            Label(f,text=Patch.get_channel_name(channel), width=8, 
 
                font=stdfont, anchor='w', padx=0, pady=0, bd=0, height=1).pack(side='left')
 
            l=Label(f,text=_oldlevels[channel-1], width=3, bg='lightBlue', 
 
            l=Label(f, width=3, bg='lightBlue', #text=_oldlevels[channel-1],
 
                font=stdfont, anchor='e', padx=1, pady=0, bd=0, height=1)
 
            l.pack(side='left')
 
            colorlabel(l)
 
            channel_levels.append(l)
 
            f.pack(side='top')
 
        # channel_levels is an output - changelevel will use it to access these labels
 

	
 
class Subpanels:
 
    def __init__(self,scenesparent,effectsparent,scalelevels,Subs,xfader,changelevel):
 
        
 
        sublist = Subs.subs.items()
 
        sublist.sort()
light8/rsn.py
Show inline comments
 
#!/usr/bin/env python
 
from __future__ import nested_scopes
 

	
 
from Tkinter import *
 
from parport import *
 
from time import sleep
 
from signal import *
 
import sys, thread, cPickle
 

	
 
import io
 
from uihelpers import *
 
@@ -52,13 +51,13 @@ def changelevel(*args):
 
    for name, s in Subs.subs.items():
 
        newlevels = s.get_levels(level=scalelevels[name].get())
 
        for (ch, fadelev) in newlevels.items():
 
            levels[ch-1] = max(levels[ch-1], fadelev)
 

	
 
    levels = [int(l) for l in levels]
 
    
 

	
 
    for lev,lab,oldlev in zip(levels, channel_levels, _oldlevels):
 
        if lev != oldlev:
 
            lab.config(text="%d" % lev)
 
            colorlabel(lab)
 

	
 
    _oldlevels = levels[:]
 
@@ -109,13 +108,13 @@ def buildinterface(*args):
 
        # print dir(evt)
 

	
 
    # sub_tl.bind('<b>', event_printer)
 
    leveldisplay=toplevelat(873,400)
 
    leveldisplay.bind('<Escape>', sys.exit)
 

	
 
    Leveldisplay(leveldisplay,_oldlevels)
 
    Leveldisplay(leveldisplay,_oldlevels,channel_levels)
 

	
 
    Console()
 

	
 
    # root frame
 
    controlpanel = Controlpanel(root,xfader,refresh,quit)
 
    
0 comments (0 inline, 0 general)