From 0805f0e72c60f512e1040fe0891ff9d2f3390921 Mon Sep 17 00:00:00 2001 From: Marko Mecina <marko.mecina@univie.ac.at> Date: Mon, 23 Jan 2023 17:19:28 +0100 Subject: [PATCH] show message if TC cannot be decoded unambiguously --- Ccs/ccs_function_lib.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ccs/ccs_function_lib.py b/Ccs/ccs_function_lib.py index f7a2151..d00b77a 100644 --- a/Ccs/ccs_function_lib.py +++ b/Ccs/ccs_function_lib.py @@ -1042,6 +1042,13 @@ def Tcdata(tm): dbcon.close() tcnames = list({x[1] for x in params}) + # return if no TC can be unambiguously assigned + _npars = {x[4] for x in params} + if len(tcnames) and len(_npars) > 1: + tcdata = None + tcnames.append("\n\nAmbiguous packet type - cannot decode.") + return tcdata, tcnames + # select one parameter set if IFSW and DBS have entry if len(tcnames) > 1: params = params[::len(tcnames)] -- GitLab