Update vbancmd.py

return only values relevant for a kind
This commit is contained in:
onyx-and-iris 2022-04-18 08:31:12 +01:00
parent 0806937fbd
commit df8688aaee

View File

@ -267,13 +267,19 @@ class VbanCmd(abc.ABC):
@property @property
def strip_levels(self): def strip_levels(self):
"""Returns the full level array for strips, PREFADER mode, before math conversion""" """Returns the full strip level array for a kind, PREFADER mode, before math conversion"""
return self.public_packet.inputlevels return tuple(
list(filter(lambda x: x != ((1 << 16) - 1), self.public_packet.inputlevels))
)
@property @property
def bus_levels(self): def bus_levels(self):
"""Returns the full level array for buses, before math conversion""" """Returns the full bus level array for a kind, before math conversion"""
return self.public_packet.outputlevels return tuple(
list(
filter(lambda x: x != ((1 << 16) - 1), self.public_packet.outputlevels)
)
)
def logout(self): def logout(self):
"""sets thread flag, closes sockets""" """sets thread flag, closes sockets"""