Changeset - 54f4f5158ddf
[Not reviewed]
default
0 2 1
drewp@bigasterisk.com - 20 months ago 2023-05-22 08:02:42
drewp@bigasterisk.com
minor
3 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/collector/collector.py
Show inline comments
 
@@ -211,13 +211,13 @@ class Collector:
 
        for device, attrs in outputAttrs.items():
 
            for outputAttr, value in attrs.items():
 
                outputUri, _index = self._outputMap[(device, outputAttr)]
 
                index = DmxMessageIndex(_index)
 
                outArray = pendingOut[outputUri]
 
                if outArray[index] != 0:
 
                    log.warn(f'conflict: {outputUri} output array was already nonzero at 0-based index {index}')
 
                    log.warning(f'conflict: {outputUri} output array was already nonzero at 0-based index {index}')
 
                    raise ValueError(f"someone already wrote to index {index}")
 
                outArray[index] = value
 
        return pendingOut
 

	
 
    def _updateOutputs(self, pendingOut: Dict[OutputUri, bytearray]):
 
        for uri, buf in pendingOut.items():
light9/effect/settings.py
Show inline comments
 
@@ -285,13 +285,13 @@ class DeviceSettings(_Settings):
 
    def merge(cls, graph: SyncedGraph, others: List[DeviceSettings]) -> DeviceSettings:
 
        return cls.fromList(graph, cast(List[_Settings], others))
 

	
 

	
 
@dataclass
 
class BareEffectSettings:
 
    # settings not specific to any effect
 
    # settings for an already-selected EffectClass
 
    s: Dict[EffectAttr, VTUnion]
 

	
 
    def withStrength(self, strength: float) -> BareEffectSettings:
 
        out = self.s.copy()
 
        out[EffectAttr(L9['strength'])] = strength
 
        return BareEffectSettings(s=out)
light9/effect/simple_outputs_test.py
Show inline comments
 
new file 100644
0 comments (0 inline, 0 general)