Changeset - 8bb2f526d457
[Not reviewed]
default
0 4 0
drewp@bigasterisk.com - 3 years ago 2022-06-02 00:00:29
drewp@bigasterisk.com
logging
4 files changed with 12 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/collector/service.py
Show inline comments
 
@@ -7,6 +7,7 @@ custom code for some attributes.
 
Input can be over http or zmq.
 
"""
 
import functools
 
import logging
 
import traceback
 
from typing import List
 

	
 
@@ -62,6 +63,9 @@ async def PutAttrs(collector: Collector,
 

	
 

	
 
def main():
 
    logging.getLogger('autodepgraphapi').setLevel(logging.INFO)
 
    logging.getLogger('syncedgraph').setLevel(logging.INFO)
 

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

	
 
    try:
light9/effect/sequencer/sequencer.py
Show inline comments
 
@@ -148,7 +148,7 @@ class CodeWatcher(object):
 

	
 

	
 
class Sequencer(object):
 

	
 
    """Notes from the graph + current song playback -> sendToCollector"""
 
    def __init__(self,
 
                 graph: SyncedGraph,
 
                 sendToCollector: Callable[[DeviceSettings], Coroutine[None ,None,None]],
 
@@ -201,7 +201,7 @@ class Sequencer(object):
 
                continue
 
            self.notes[song].append(n)
 
        if not anyErrors:
 
            log.info('built all notes')
 
            log.info(f'built all notes for {song}')
 

	
 
    async def updateLoop(self):
 
        while True:
light9/effect/sequencer/service.py
Show inline comments
 
@@ -11,7 +11,7 @@ from light9 import networking
 
from light9.collector.collector_client_asyncio import sendToCollector
 
from light9.effect.sequencer.sequencer import StateUpdate, Sequencer
 
from light9.effect.settings import DeviceSettings
 
from light9.metrics import metrics, metricsRoute
 
from light9.metrics import metrics
 
from light9.run_local import log
 
from louie import dispatcher
 
from rdfdb.syncedgraph.syncedgraph import SyncedGraph
 
@@ -49,6 +49,7 @@ def main():
 
    session = 'effectSequencer'
 
    graph = SyncedGraph(networking.rdfdb.url, "effectSequencer")
 
    logging.getLogger('autodepgraphapi').setLevel(logging.INFO)
 
    logging.getLogger('syncedgraph').setLevel(logging.INFO)
 
    logging.getLogger('sse_starlette.sse').setLevel(logging.INFO)
 

	
 
    async def send(settings: DeviceSettings):
light9/fade/web/Light9FadeUi.ts
Show inline comments
 
@@ -103,14 +103,18 @@ export class Light9Fader extends LitElem
 
    });
 
  }
 
  configure() {
 
    //   console.time(`fader configure ${this.uri.value}`)
 
    const U = this.graph.U();
 
    this.column = this.graph.stringValue(this.uri, U(":column"));
 
    this.effect = this.graph.uriValue(this.uri, U(":effectClass"));
 
    this.effectAttr = this.graph.uriValue(this.uri, U(":effectAttr"));
 
    // console.timeEnd(`fader configure ${this.uri.value}`)
 
  }
 
valueSync() {
 
    // console.time(`valueSync ${this.uri.value}`)
 
    this.value = this.graph.floatValue(this.uri, this.graph.Uri(":value"));
 
}
 
    // console.timeEnd(`valueSync ${this.uri.value}`)
 
  onSliderInput(ev: CustomEvent) {
 
    this.value = (ev.target as any).valueAsNumber;
 
    this.graph.patchObject(this.uri, this.graph.Uri(":value"), this.graph.LiteralRoundedFloat(this.value), this.ctx);
0 comments (0 inline, 0 general)