Mercurial > code > home > repos > light9
diff bin/effecteval @ 1115:818275850003
effecteval screens for only the kinds of outputs that it can send, so i can run a second instance just for LEDs
Ignore-this: e1b1fdd4564096ab9e214bb5e52db765
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Fri, 13 Jun 2014 05:27:46 +0000 |
parents | a38955ba6f40 |
children | 2a89050c140b |
line wrap: on
line diff
--- a/bin/effecteval Fri Jun 13 05:25:02 2014 +0000 +++ b/bin/effecteval Fri Jun 13 05:27:46 2014 +0000 @@ -7,11 +7,11 @@ import sys, optparse, logging, subprocess, json, time, traceback, itertools from rdflib import URIRef, Literal -sys.path.append(".") +sys.path.append('/usr/lib/python2.7/dist-packages') # For numpy from light9 import networking, showconfig, Submaster, dmxclient from light9.curvecalc.curve import CurveResource from light9.effecteval.effect import EffectNode -from light9.effecteval.effectloop import EffectLoop +from light9.effecteval.effectloop import makeEffectLoop from light9.greplin_cyclone import StatsForCyclone from light9.namespaces import L9, RDF, RDFS from light9.rdfdb.patch import Patch @@ -195,7 +195,8 @@ ) def launch(self, *args): - self.loop = EffectLoop(self.graph, self.stats) + self.loop = makeEffectLoop(self.graph, self.stats, self.outputWhere) + self.loop.startLoop() SFH = cyclone.web.StaticFileHandler self.cycloneApp = cyclone.web.Application(handlers=[ @@ -236,14 +237,14 @@ help="logging.DEBUG") parser.add_option("--twistedlog", action="store_true", help="twisted logging") + parser.add_option("--output", metavar="WHERE", help="dmx or leds") (options, args) = parser.parse_args() - log.setLevel(logging.DEBUG if options.verbose else logging.INFO) if not options.show: raise ValueError("missing --show http://...") - app = App(URIRef(options.show)) + app = App(URIRef(options.show), options.output) if options.twistedlog: from twisted.python import log as twlog twlog.startLogging(sys.stderr)