mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 10:30:48 +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":
|
if subject == "pdirty":
|
||||||
print("pdirty!")
|
print("pdirty!")
|
||||||
elif subject == "ldirty":
|
elif subject == "ldirty":
|
||||||
info = (
|
for bus in self.vban.bus:
|
||||||
f"[{self.vban.bus[0]} {self.vban.bus[0].levels.isdirty}]",
|
if bus.levels.isdirty:
|
||||||
f"[{self.vban.bus[1]} {self.vban.bus[1].levels.isdirty}]",
|
print(bus, bus.levels.all)
|
||||||
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))
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user