From bbe1798f06a4f9c6c80adecded0ad46a076be5b7 Mon Sep 17 00:00:00 2001 From: jupfi Date: Fri, 15 Dec 2023 17:24:59 +0100 Subject: [PATCH] Added lime safety. --- src/nqrduck_autotm/controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nqrduck_autotm/controller.py b/src/nqrduck_autotm/controller.py index 175aa3c..a2f39c9 100644 --- a/src/nqrduck_autotm/controller.py +++ b/src/nqrduck_autotm/controller.py @@ -68,7 +68,10 @@ class AutoTMController(ModuleController): # Switch back to preamp to perform a measurement self.switch_to_preamp() - self.module.nqrduck_signal.emit("confirm_tune_and_match", reflection) + # The Lime doesn"t like it if we send the command to switch to atm and then immediately send the command to measure the reflection. + # So we wait a bit before starting the measurement + + QTimer.singleShot(100, lambda: self.module.nqrduck_signal.emit("confirm_tune_and_match", reflection)) def find_devices(self) -> None: """Scan for available serial devices and add them to the model as available devices."""