From 648d7a3d875be004a7f9221e32a56308c68b9a3a Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 24 Apr 2024 10:50:14 +0800 Subject: [PATCH] moninj: consistent sort_keys --- artiq/dashboard/moninj.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index 3e3984910..fdcf7bb63 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -158,7 +158,7 @@ class _TTLHandler: self.refresh_display() def sort_key(self): - return self.channel + return (0, self.channel, 0) class _DDSWidget(QtWidgets.QFrame): @@ -354,7 +354,7 @@ class _DDSHandler: self.dm.dds_channel_toggle(self.dds_name, sw=False) def sort_key(self): - return (self.bus_channel, self.channel) + return (1, self.bus_channel, self.channel) class _DACWidget(QtWidgets.QFrame): @@ -407,7 +407,7 @@ class _DACHandler: self.widget.set_value(self.cur_value * 100 / 2**16) def sort_key(self): - return (self.spi_channel, self.channel) + return (2, self.spi_channel, self.channel) _HandlerDesc = namedtuple("_HandlerDesc", "uid comment cls arguments")