Index: leahi_dialin/utils/abstract_classes.py =================================================================== diff -u -r4c11f61e1e328407ed98a1b81a3e8b0adb278bd5 -r436742844a3fbbb6a3b0bc81dc87bc6385c3e368 --- leahi_dialin/utils/abstract_classes.py (.../abstract_classes.py) (revision 4c11f61e1e328407ed98a1b81a3e8b0adb278bd5) +++ leahi_dialin/utils/abstract_classes.py (.../abstract_classes.py) (revision 436742844a3fbbb6a3b0bc81dc87bc6385c3e368) @@ -52,14 +52,13 @@ class AbstractSubSystem: @abstractmethod - def __init__(self): + def __init__(self, *args, **kwargs): """ Initialization function for the sub system # The abstract base class requires all abstract methods are overridden by children classes """ self._observers = [] self._datetime_fmt = "%m.%d.%Y_%I.%M.%S.%f" - pass def attach(self, observer: AbstractObserver): @@ -113,6 +112,16 @@ key_1 = decode_details[1] if len(decode_details) >= base_list_length + 1 else None key_2 = decode_details[2] if len(decode_details) >= base_list_length + 2 else None key_3 = decode_details[3] if len(decode_details) >= base_list_length + 3 else None + + # If it's referencing an earlier entry, change the key in the dictionary to that value + # Example sensor_id = 0 and key_1 is 'sensor_id' instead of the key being 'sensor_id', it will be replaced with 0 + if key_1 is not None and key_1 in result: + key_1 = result[key_1] + if key_2 is not None and key_2 in result: + key_2 = result[key_2] + if key_3 is not None and key_3 in result: + key_3 = result[key_3] + end_pos = start_pos + datatype.size() if debug: print(f'Len: {len(decode_details)}')