From 90dfc644a7c1f95ca5fb6c77f62584b3edb8ea5d Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Thu, 18 Apr 2024 10:30:13 +0800 Subject: [PATCH] moninj: add uid fields to handlers, widgets --- artiq/dashboard/moninj.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index 355fa18d6..cf7d6a243 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -34,6 +34,8 @@ class _TTLWidget(QtWidgets.QFrame): self.setFrameShape(QtWidgets.QFrame.Box) self.setFrameShadow(QtWidgets.QFrame.Raised) + self.uid = title + grid = QtWidgets.QGridLayout() grid.setContentsMargins(2, 2, 2, 2) grid.setHorizontalSpacing(2) @@ -96,6 +98,7 @@ class _TTLHandler: self.force_out = force_out self.set_mode = dm.ttl_set_mode self.title = title + self.uid = title self.cur_level = False self.cur_oe = False self.cur_override = False @@ -149,6 +152,8 @@ class _DDSWidget(QtWidgets.QFrame): def __init__(self, title, is_urukul): QtWidgets.QFrame.__init__(self) + self.uid = title + self.setFrameShape(QtWidgets.QFrame.Box) self.setFrameShadow(QtWidgets.QFrame.Raised) @@ -248,6 +253,7 @@ class _DDSHandler: ref_clk, cpld=None, pll=1, clk_div=0): self.dm = dm self.title = title + self.uid = title self.bus_channel = bus_channel self.channel = channel self.cur_frequency = 0 @@ -317,6 +323,8 @@ class _DACWidget(QtWidgets.QFrame): def __init__(self, channel, title): QtWidgets.QFrame.__init__(self) + self.uid = (title, channel) + self.setFrameShape(QtWidgets.QFrame.Box) self.setFrameShadow(QtWidgets.QFrame.Raised) @@ -344,6 +352,7 @@ class _DACHandler: self.spi_channel = spi_channel self.channel = channel self.title = title + self.uid = (title, channel) def create_widget(self): self.widget = _DACWidget(self.channel, self.title)