Changeset - 101bcb57b80f
[Not reviewed]
default
0 2 0
Drew Perttula - 6 years ago 2019-06-01 01:13:54
drewp@bigasterisk.com
2 files changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
bin/keyboardcomposer
Show inline comments
 
@@ -131,23 +131,23 @@ class SubmasterBox(tk.Frame):
 

	
 
        # initial position
 
        # stil need? dispatcher.send("send_to_hw", sub=sub.uri, hwCol=col + 1)
 

	
 
    def getVal(self) -> float:
 
        return self._val
 
    
 

	
 
    def setVal(self, newVal: float) -> None:
 
        if self.dead:
 
            return
 
        try:
 
            self.scale.set(newVal)
 
            self.levellabel.config(text=str(newVal))
 
        except Exception:
 
            log.warn("disabling handlers on broken subbox")
 
            self.dead = True
 
        
 

	
 
    def cleanup(self):
 
        self.slider_var.trace_vdelete('w', self._slider_var_trace)
 

	
 
    def slider_changed(self, *args):
 
        self._val = self.scale.get()
 
        self.scale.draw_indicator_colors()
 
@@ -187,17 +187,17 @@ class SubmasterBox(tk.Frame):
 
            if graph.value(setting, L9['sub']) == self.sub:
 
                self.pauseTrace = True  # don't bounce this update back to server
 
                try:
 
                    self.setVal(graph.value(setting, L9['level']).toPython())
 
                finally:
 
                    self.pauseTrace = False
 
                    
 

	
 
    def updateName(self):
 
        if self.scale is None:
 
            return
 
        
 

	
 
        def shortUri(u):
 
            return '.../' + u.split('/')[-1]
 

	
 
        try:
 
            self.namelabel.config(
 
                text=self.graph.label(self.sub) or shortUri(self.sub))
 
@@ -530,14 +530,15 @@ class KeyboardComposer(tk.Frame, SubClie
 

	
 
    def unhighlight_row(self, row):
 
        row = self.rows[row]
 
        row['bg'] = 'black'
 

	
 
    def get_levels(self):
 
        return dict([(uri, box.getVal())
 
                     for uri, box in list(self.subbox.items())])
 
        return dict([
 
            (uri, box.getVal()) for uri, box in list(self.subbox.items())
 
        ])
 

	
 
    def get_output_settings(self, _graph=None):
 
        _graph = _graph or self.graph
 
        outputSettings = []
 
        for setting in _graph.objects(self.session, L9['subSetting']):
 
            effect = _graph.value(setting, L9['sub'])
light9/vidref/musictime.py
Show inline comments
 
@@ -63,13 +63,14 @@ class MusicTime(object):
 
    def pollMusicTime(self):
 

	
 
        @inlineCallbacks
 
        def cb(response):
 

	
 
            if response.code != 200:
 
                raise ValueError("%s %s", response.code, (yield response.content()))
 
                raise ValueError("%s %s", response.code,
 
                                 (yield response.content()))
 

	
 
            position = yield response.json()
 

	
 
            # this is meant to be the time when the server gave me its
 
            # report, and I don't know if that's closer to the
 
            # beginning of my request or the end of it (or some
0 comments (0 inline, 0 general)