comparison bin/keyboardcomposer @ 368:ce302e4a73dc

keyboardcomposer: hw startup should move if value is 0
author David McClosky <dmcc@bigasterisk.com>
date Fri, 15 Jun 2007 17:47:45 +0000
parents 430014be95ce
children e0fc0e6127f4
comparison
equal deleted inserted replaced
367:0db89c347000 368:ce302e4a73dc
238 v = round(127 * self.slider_vars[subName].get()) 238 v = round(127 * self.slider_vars[subName].get())
239 chan = "slider%s" % hwNum 239 chan = "slider%s" % hwNum
240 240
241 # workaround for some rounding issue, where we receive one 241 # workaround for some rounding issue, where we receive one
242 # value and then decide to send back a value that's one step 242 # value and then decide to send back a value that's one step
243 # lower 243 # lower. -5 is a fallback for having no last value. hopefully
244 if abs(v - self.sliders.lastValue.get(chan, 0)) <= 1: 244 # we won't really see it
245 if abs(v - self.sliders.lastValue.get(chan, -5)) <= 1:
245 return 246 return
246 self.sliders.valueOut(chan, v) 247 self.sliders.valueOut(chan, v)
247 248
248 def make_row(self): 249 def make_row(self):
249 row = Frame(self, bd=2, bg='black') 250 row = Frame(self, bd=2, bg='black')