From 0eef206a6f61cbfa364ba5505b44521cdfc112a4 Mon Sep 17 00:00:00 2001 From: jupfi Date: Wed, 16 Aug 2023 10:37:09 +0200 Subject: [PATCH] Fixed bug w. different number formats. --- src/nqrduck_autotm/controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nqrduck_autotm/controller.py b/src/nqrduck_autotm/controller.py index 35b5bca..f2da006 100644 --- a/src/nqrduck_autotm/controller.py +++ b/src/nqrduck_autotm/controller.py @@ -3,7 +3,7 @@ import numpy as np import json from serial.tools.list_ports import comports from PyQt6 import QtSerialPort -from PyQt5.QtCore import QThread, pyqtSignal, pyqtSlot +from PyQt6.QtCore import QThread, pyqtSignal, pyqtSlot from nqrduck.module.module_controller import ModuleController from .model import S11Data @@ -51,6 +51,8 @@ class AutoTMController(ModuleController): MAX_FREQUENCY = 300e6 # Hz try: + start_frequence = start_frequency.replace(",", ".") + stop_frequency = stop_frequency.replace(",", ".") start_frequency = float(start_frequency) * 1e6 stop_frequency = float(stop_frequency) * 1e6 except ValueError: @@ -286,6 +288,8 @@ class AutoTMController(ModuleController): logger.debug("Setting voltages") MAX_VOLTAGE = 5 # V try: + tuning_voltage = tuning_voltage.replace(",", ".") + matching_voltage = matching_voltage.replace(",", ".") tuning_voltage = float(tuning_voltage) matching_voltage = float(matching_voltage) except ValueError: