mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 18:40:47 +00:00
add fget() to level getters in strip, bus
This commit is contained in:
parent
a029011012
commit
8663aab2ce
@ -74,13 +74,16 @@ class BusLevel(IRemote):
|
|||||||
def getter(self):
|
def getter(self):
|
||||||
"""Returns a tuple of level values for the channel."""
|
"""Returns a tuple of level values for the channel."""
|
||||||
|
|
||||||
|
def fget(i):
|
||||||
|
return round((((1 << 16) - 1) - i) * -0.01, 1)
|
||||||
|
|
||||||
if self._remote.running and self._remote.event.ldirty:
|
if self._remote.running and self._remote.event.ldirty:
|
||||||
return tuple(
|
return tuple(
|
||||||
round(i * -0.01, 1)
|
fget(i)
|
||||||
for i in self._remote.cache["bus_level"][self.range[0] : self.range[-1]]
|
for i in self._remote.cache["bus_level"][self.range[0] : self.range[-1]]
|
||||||
)
|
)
|
||||||
return tuple(
|
return tuple(
|
||||||
round(i * -0.01, 1)
|
fget(i)
|
||||||
for i in self._remote._get_levels(self.public_packet)[1][
|
for i in self._remote._get_levels(self.public_packet)[1][
|
||||||
self.range[0] : self.range[-1]
|
self.range[0] : self.range[-1]
|
||||||
]
|
]
|
||||||
|
@ -105,15 +105,18 @@ class StripLevel(IRemote):
|
|||||||
def getter(self):
|
def getter(self):
|
||||||
"""Returns a tuple of level values for the channel."""
|
"""Returns a tuple of level values for the channel."""
|
||||||
|
|
||||||
|
def fget(i):
|
||||||
|
return round((((1 << 16) - 1) - i) * -0.01, 1)
|
||||||
|
|
||||||
if self._remote.running and self._remote.event.ldirty:
|
if self._remote.running and self._remote.event.ldirty:
|
||||||
return tuple(
|
return tuple(
|
||||||
round(i * -0.01, 1)
|
fget(i)
|
||||||
for i in self._remote.cache["strip_level"][
|
for i in self._remote.cache["strip_level"][
|
||||||
self.range[0] : self.range[-1]
|
self.range[0] : self.range[-1]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
return tuple(
|
return tuple(
|
||||||
round(i * -0.01, 1)
|
fget(i)
|
||||||
for i in self._remote._get_levels(self.public_packet)[0][
|
for i in self._remote._get_levels(self.public_packet)[0][
|
||||||
self.range[0] : self.range[-1]
|
self.range[0] : self.range[-1]
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user