From 88903fb38c41f6464aa28dee5665a6da430701e7 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Thu, 2 May 2024 15:38:37 +0800 Subject: [PATCH] artiq_dashboard: connect Devices sub after loading state --- artiq/frontend/artiq_dashboard.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/artiq/frontend/artiq_dashboard.py b/artiq/frontend/artiq_dashboard.py index 45996a537..6544a7f08 100755 --- a/artiq/frontend/artiq_dashboard.py +++ b/artiq/frontend/artiq_dashboard.py @@ -236,14 +236,6 @@ def main(): ) atexit_register_coroutine(d_waveform.stop, loop=loop) - def init_cbs(ddb): - d_ttl_dds.dm.init_ddb(ddb) - d_waveform.init_ddb(ddb) - return ddb - devices_sub = Subscriber("devices", init_cbs, [d_ttl_dds.dm.notify_ddb, d_waveform.notify_ddb]) - loop.run_until_complete(devices_sub.connect(args.server, args.port_notify)) - atexit_register_coroutine(devices_sub.close, loop=loop) - d_interactive_args = interactive_args.InteractiveArgsDock( sub_clients["interactive_args"], rpc_clients["interactive_arg_db"] @@ -276,6 +268,15 @@ def main(): # QDockWidgets fail to be embedded. main_window.show() smgr.load() + + def init_cbs(ddb): + d_ttl_dds.dm.init_ddb(ddb) + d_waveform.init_ddb(ddb) + return ddb + devices_sub = Subscriber("devices", init_cbs, [d_ttl_dds.dm.notify_ddb, d_waveform.notify_ddb]) + loop.run_until_complete(devices_sub.connect(args.server, args.port_notify)) + atexit_register_coroutine(devices_sub.close, loop=loop) + smgr.start(loop=loop) atexit_register_coroutine(smgr.stop, loop=loop)