Update dataclass.py

split at null terminator
This commit is contained in:
onyx-and-iris 2022-03-23 12:08:08 +00:00
parent 559acb9e89
commit a94b2bb265

View File

@ -109,11 +109,11 @@ class VBAN_VMRT_Packet_Data:
@property @property
def striplabels(self) -> tuple: def striplabels(self) -> tuple:
""" returns tuple of strip labels """ """ returns tuple of strip labels """
return tuple(self._stripLabelUTF8c60[i:i+60].decode('ascii') for i in range(0, 480, 60)) return tuple(self._stripLabelUTF8c60[i:i+60].decode('ascii').split('\x00')[0] for i in range(0, 480, 60))
@property @property
def buslabels(self) -> tuple: def buslabels(self) -> tuple:
""" returns tuple of bus labels """ """ returns tuple of bus labels """
return tuple(self._busLabelUTF8c60[i:i+60].decode('ascii') for i in range(0, 480, 60)) return tuple(self._busLabelUTF8c60[i:i+60].decode('ascii').split('\x00')[0] for i in range(0, 480, 60))
@dataclass @dataclass
class VBAN_VMRT_Packet_Header: class VBAN_VMRT_Packet_Header: