diff --git a/grmn/tlv.py b/grmn/tlv.py index ef6f88f..03cc450 100644 --- a/grmn/tlv.py +++ b/grmn/tlv.py @@ -44,7 +44,10 @@ class TLV: new_tlv = TLV6(type_id, length) elif type_id == 0x0007: new_tlv = TLV7(type_id, length) - elif type_id in [0x0008, 0x0401, 0x0505, 0x0555, 0x0557, 0x02bd]: + elif type_id == 0x0401: + new_tlv = TLVbinary0401(type_id, length) + new_tlv.is_binary = True + elif type_id in [0x0008, 0x0505, 0x0555, 0x0557, 0x02bd]: new_tlv = TLVbinary(type_id, length) new_tlv.is_binary = True else: @@ -332,3 +335,16 @@ class TLVbinary(TLV): valstr = "0x{:08x}".format(v) data.append(("0x{:04x}".format(fid), valstr, fdesc)) return data + +class TLVbinary0401(TLVbinary): + def __str__(self): + txt = super().__str__() + hdr = unpack("