From 5fdbec2ea43a13f3cef2d497dcdc95165ba1616c Mon Sep 17 00:00:00 2001 From: Santeri Saariokari <34010391+saarioka@users.noreply.github.com> Date: Mon, 16 Sep 2024 19:14:07 +0300 Subject: [PATCH 1/3] Maybe fix str comparison bug --- Gui/GUIutils/guiUtils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gui/GUIutils/guiUtils.py b/Gui/GUIutils/guiUtils.py index f9272f5..154bd37 100644 --- a/Gui/GUIutils/guiUtils.py +++ b/Gui/GUIutils/guiUtils.py @@ -403,8 +403,12 @@ def GenerateXMLConfig(firmwareList, testName, outputDir, **arg): HyBridModule0.SetHyBridName(module.getModuleName()) moduleType = module.getModuleType() - RxPolarities = "1" if "CROC" and "Quad" in moduleType else "0" if "CROC" in moduleType else None - revPolarity = not ("CROC" and "1x2" in moduleType) + + RxPolarities = None + RxPolarities = "0" if "CROC" in moduleType + RxPolarities = "1" if "CROC" in moduleType and "Quad" in moduleType + + revPolarity = not ("CROC" in moduleType and "1x2" in moduleType) FESettings_Dict = FESettings_DictB if "CROC" in moduleType else FESettings_DictA globalSettings_Dict = globalSettings_DictB if "CROC" in moduleType else globalSettings_DictA HWSettings_Dict = HWSettings_DictB if "CROC" in moduleType else HWSettings_DictA From 2fd3d710c1a0c130de5e338fa9902c200f51221e Mon Sep 17 00:00:00 2001 From: Santeri Saariokari <34010391+saarioka@users.noreply.github.com> Date: Mon, 16 Sep 2024 19:17:10 +0300 Subject: [PATCH 2/3] str comparison fix --- Gui/GUIutils/guiUtils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gui/GUIutils/guiUtils.py b/Gui/GUIutils/guiUtils.py index 154bd37..5d82223 100644 --- a/Gui/GUIutils/guiUtils.py +++ b/Gui/GUIutils/guiUtils.py @@ -405,8 +405,10 @@ def GenerateXMLConfig(firmwareList, testName, outputDir, **arg): moduleType = module.getModuleType() RxPolarities = None - RxPolarities = "0" if "CROC" in moduleType - RxPolarities = "1" if "CROC" in moduleType and "Quad" in moduleType + if "CROC" in moduleType: + RxPolarities = "0" + if "CROC" in moduleType and "Quad" in moduleType: + RxPolarities = "1" revPolarity = not ("CROC" in moduleType and "1x2" in moduleType) FESettings_Dict = FESettings_DictB if "CROC" in moduleType else FESettings_DictA From ebdec1907c8986c02cb7918e248d20b7988c7647 Mon Sep 17 00:00:00 2001 From: Santeri Saariokari <34010391+saarioka@users.noreply.github.com> Date: Mon, 16 Sep 2024 19:18:39 +0300 Subject: [PATCH 3/3] indent --- Gui/GUIutils/guiUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gui/GUIutils/guiUtils.py b/Gui/GUIutils/guiUtils.py index 5d82223..1941ce9 100644 --- a/Gui/GUIutils/guiUtils.py +++ b/Gui/GUIutils/guiUtils.py @@ -405,9 +405,9 @@ def GenerateXMLConfig(firmwareList, testName, outputDir, **arg): moduleType = module.getModuleType() RxPolarities = None - if "CROC" in moduleType: + if "CROC" in moduleType: RxPolarities = "0" - if "CROC" in moduleType and "Quad" in moduleType: + if "CROC" in moduleType and "Quad" in moduleType: RxPolarities = "1" revPolarity = not ("CROC" in moduleType and "1x2" in moduleType)