Changeset - 04f2e93f04e3
[Not reviewed]
default
0 2 0
Drew Perttula - 8 years ago 2017-05-10 07:13:27
drewp@bigasterisk.com
effecteval log startup error
Ignore-this: 6ab4a5a770c8557a2459072dde4ce17e
2 files changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/effecteval
Show inline comments
 
@@ -286,23 +286,24 @@ class SongEffectsEval(PrettyErrorHandler
 

	
 
class App(object):
 
    def __init__(self, show, outputWhere):
 
        self.show = show
 
        self.outputWhere = outputWhere
 
        self.graph = SyncedGraph(networking.rdfdb.url, "effectEval")
 
        self.graph.initiallySynced.addCallback(self.launch)
 
        self.graph.initiallySynced.addCallback(self.launch).addErrback(log.error)
 

	
 
        self.stats = scales.collection('/',
 
                                       scales.PmfStat('sendLevels'),
 
                                       scales.PmfStat('getMusic'),
 
                                       scales.PmfStat('evals'),
 
                                       scales.PmfStat('sendOutput'),
 
                                       scales.IntStat('errors'),
 
                                       )
 

	
 
    def launch(self, *args):
 
        log.info('launch')
 
        self.loop = makeEffectLoop(self.graph, self.stats, self.outputWhere)
 
        self.loop.startLoop()
 
        
 
        SFH = cyclone.web.StaticFileHandler
 
        self.cycloneApp = cyclone.web.Application(handlers=[
 
            (r'/()', SFH,
light9/effecteval/effectloop.py
Show inline comments
 
@@ -182,12 +182,13 @@ class EffectLoop(object):
 
                          for k,v in out.get_levels().items()))
 

	
 
Z = numpy.zeros((50, 3), dtype=numpy.float16)
 

	
 
class ControlBoard(object):
 
    def __init__(self, dev='/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A7027NYX-if00-port0'):
 
        log.info('opening %s', dev)
 
        self._dev = serial.Serial(dev, baudrate=115200)
 

	
 
    def _8bitMessage(self, floatArray):
 
        px255 = (numpy.clip(floatArray, 0, 1) * 255).astype(numpy.uint8)
 
        return px255.reshape((-1,)).tostring()
 
        
0 comments (0 inline, 0 general)