Changeset - 22c1b5c60a64
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 8 months ago 2024-05-13 22:47:41
drewp@bigasterisk.com
turn on udmx output of collector
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/light9/collector/output.py
Show inline comments
 
@@ -77,13 +77,13 @@ class DummyOutput(Output):
 

	
 
class BackgroundLoopOutput(Output):
 
    """Call _write forever at 20hz in background threads"""
 

	
 
    rate: float
 

	
 
    def __init__(self, uri, rate=22):
 
    def __init__(self, uri, rate=22.0):
 
        super().__init__(uri)
 
        self.rate = rate
 
        self._currentBuffer = b''
 

	
 
        self._task = asyncio.create_task(self._loop())
 

	
src/light9/collector/service.py
Show inline comments
 
@@ -105,23 +105,23 @@ def main():
 
    logging.getLogger('output.allDmx').setLevel(logging.WARNING)
 
    logging.getLogger().setLevel(logging.DEBUG)
 
    logging.getLogger('collector').setLevel(logging.DEBUG)
 

	
 
    graph = SyncedGraph(networking.rdfdb.url, "collector")
 

	
 
    #devPath, usbAddress = findDevice()
 
    devPath, usbAddress = findDevice()
 
            # if user doesn't have r/w, fail now
 
    try:
 
        # todo: drive outputs with config files
 
        outputs: List[Output] = [
 
            # ArtnetDmx(L9['output/dmxA/'],
 
            #           host='127.0.0.1',
 
            #           port=6445,
 
            #           rate=rate),
 
            #sudo chmod a+rw /dev/bus/usb/003/021
 
#            Udmx(L9['output/dmxA/'], bus=1, address=usbAddress, lastDmxChannel=200, rate=RATE),
 
            Udmx(L9['output/dmxA/'], bus=3, address=usbAddress, lastDmxChannel=200, rate=RATE),
 
        ]
 
    except Exception:
 
        log.error("setting up outputs:")
 
        traceback.print_exc()
 
        raise
 
    listeners = WebListeners()
0 comments (0 inline, 0 general)