Changeset - ce302e4a73dc
[Not reviewed]
default
0 1 0
David McClosky - 18 years ago 2007-06-15 17:47:45
dmcc@bigasterisk.com
keyboardcomposer: hw startup should move if value is 0
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/keyboardcomposer
Show inline comments
 
@@ -237,14 +237,15 @@ class KeyboardComposer(Frame, SubClient)
 
            
 
        v = round(127 * self.slider_vars[subName].get())
 
        chan = "slider%s" % hwNum
 
        
 
        # workaround for some rounding issue, where we receive one
 
        # value and then decide to send back a value that's one step
 
        # lower
 
        if abs(v - self.sliders.lastValue.get(chan, 0)) <= 1:
 
        # lower.  -5 is a fallback for having no last value.  hopefully
 
        # we won't really see it
 
        if abs(v - self.sliders.lastValue.get(chan, -5)) <= 1:
 
            return
 
        self.sliders.valueOut(chan, v)
 
            
 
    def make_row(self):
 
        row = Frame(self, bd=2, bg='black')
 
        row.pack(expand=1, fill=BOTH)
0 comments (0 inline, 0 general)