From 53c7a5f2c66df7ac3ba1b99091511a43c46ea251 Mon Sep 17 00:00:00 2001 From: Chris Ballance Date: Fri, 31 Aug 2018 21:08:20 +0100 Subject: [PATCH] dashboard: fix TTL moninj level display --- artiq/dashboard/moninj.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index bbd0b9a3e..8502667f3 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -74,6 +74,7 @@ class _TTLWidget(QtWidgets.QFrame): self.cur_level = False self.cur_oe = False self.cur_override = False + self.cur_override_level = False self.refresh_display() def enterEvent(self, event): @@ -106,7 +107,9 @@ class _TTLWidget(QtWidgets.QFrame): self.set_mode(self.channel, "0") def refresh_display(self): - value_s = "1" if self.cur_level else "0" + level = self.cur_override_level if self.cur_override else self.cur_level + value_s = "1" if level else "0" + if self.cur_override: value_s = "" + value_s + "" color = " color=\"red\"" @@ -377,7 +380,7 @@ class _DeviceManager: if override == TTLOverride.en.value: widget.cur_override = bool(value) if override == TTLOverride.level.value: - widget.cur_level = bool(value) + widget.cur_override_level = bool(value) widget.refresh_display() async def core_connector(self):