print bus level values in observer example

This commit is contained in:
onyx-and-iris 2022-10-04 15:43:09 +01:00
parent 4659cf7cdb
commit 02b21b6989

View File

@ -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():