forked from M-Labs/artiq
dashboard: fix TTL moninj level display
This commit is contained in:
parent
20cddb6a25
commit
53c7a5f2c6
@ -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 = "<b>" + value_s + "</b>"
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user