mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2024-11-15 17:10:46 +00:00
print bus level values in observer example
This commit is contained in:
parent
4659cf7cdb
commit
02b21b6989
@ -16,17 +16,9 @@ class Observer:
|
||||
if subject == "pdirty":
|
||||
print("pdirty!")
|
||||
elif subject == "ldirty":
|
||||
info = (
|
||||
f"[{self.vban.bus[0]} {self.vban.bus[0].levels.isdirty}]",
|
||||
f"[{self.vban.bus[1]} {self.vban.bus[1].levels.isdirty}]",
|
||||
f"[{self.vban.bus[2]} {self.vban.bus[2].levels.isdirty}]",
|
||||
f"[{self.vban.bus[3]} {self.vban.bus[3].levels.isdirty}]",
|
||||
f"[{self.vban.bus[4]} {self.vban.bus[4].levels.isdirty}]",
|
||||
f"[{self.vban.bus[5]} {self.vban.bus[5].levels.isdirty}]",
|
||||
f"[{self.vban.bus[6]} {self.vban.bus[6].levels.isdirty}]",
|
||||
f"[{self.vban.bus[7]} {self.vban.bus[7].levels.isdirty}]",
|
||||
)
|
||||
print(" ".join(info))
|
||||
for bus in self.vban.bus:
|
||||
if bus.levels.isdirty:
|
||||
print(bus, bus.levels.all)
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user