mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-02-23 10:15:14 +00:00
BusEQ added to Bus class
This commit is contained in:
parent
c74d827154
commit
d5219d66f7
@ -52,6 +52,23 @@ class Bus(IRemote):
|
|||||||
time.sleep(self._remote.DELAY)
|
time.sleep(self._remote.DELAY)
|
||||||
|
|
||||||
|
|
||||||
|
class BusEQ(IRemote):
|
||||||
|
@classmethod
|
||||||
|
def make(cls, remote, index):
|
||||||
|
BUSEQ_cls = type(
|
||||||
|
f"BusEQ{remote.kind}",
|
||||||
|
(cls,),
|
||||||
|
{
|
||||||
|
**{param: channel_bool_prop(param) for param in ["on", "ab"]},
|
||||||
|
},
|
||||||
|
)
|
||||||
|
return BUSEQ_cls(remote, index)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def identifier(self) -> str:
|
||||||
|
return f"Bus[{self.index}].eq"
|
||||||
|
|
||||||
|
|
||||||
class PhysicalBus(Bus):
|
class PhysicalBus(Bus):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{type(self).__name__}{self.index}"
|
return f"{type(self).__name__}{self.index}"
|
||||||
@ -167,11 +184,10 @@ def bus_factory(phys_bus, remote, i) -> Union[PhysicalBus, VirtualBus]:
|
|||||||
f"{BUS_cls.__name__}{remote.kind}",
|
f"{BUS_cls.__name__}{remote.kind}",
|
||||||
(BUS_cls,),
|
(BUS_cls,),
|
||||||
{
|
{
|
||||||
|
"eq": BusEQ.make(remote, i),
|
||||||
"levels": BusLevel(remote, i),
|
"levels": BusLevel(remote, i),
|
||||||
"mode": BUSMODEMIXIN_cls(remote, i),
|
"mode": BUSMODEMIXIN_cls(remote, i),
|
||||||
**{param: channel_bool_prop(param) for param in ["mute", "mono"]},
|
**{param: channel_bool_prop(param) for param in ["mute", "mono"]},
|
||||||
"eq": channel_bool_prop("eq.On"),
|
|
||||||
"eq_ab": channel_bool_prop("eq.ab"),
|
|
||||||
"label": channel_label_prop(),
|
"label": channel_label_prop(),
|
||||||
},
|
},
|
||||||
)(remote, i)
|
)(remote, i)
|
||||||
|
Loading…
Reference in New Issue
Block a user