update cap17()

This commit is contained in:
Junzi Sun 2020-10-16 22:32:03 +02:00
parent dd3a869c08
commit c3976f1ca3
2 changed files with 4 additions and 8 deletions

View File

@ -21,7 +21,7 @@ def is17(msg):
d = common.hex2bin(common.data(msg)) d = common.hex2bin(common.data(msg))
if common.bin2int(d[28:56]) != 0: if common.bin2int(d[24:56]) != 0:
return False return False
caps = cap17(msg) caps = cap17(msg)
@ -72,14 +72,10 @@ def cap17(msg):
"56", "56",
"5F", "5F",
"60", "60",
"NA",
"NA",
"E1",
"E2",
] ]
d = common.hex2bin(common.data(msg)) d = common.hex2bin(common.data(msg))
idx = [i for i, v in enumerate(d[:28]) if v == "1"] idx = [i for i, v in enumerate(d[:24]) if v == "1"]
capacity = ["BDS" + allbds[i] for i in idx if allbds[i] is not "NA"] capacity = ["BDS" + allbds[i] for i in idx]
return capacity return capacity

View File

@ -117,4 +117,4 @@ def alt40fms(msg):
"alt40fms() has been renamed to selalt40fms(). It will be removed in the future.", "alt40fms() has been renamed to selalt40fms(). It will be removed in the future.",
DeprecationWarning, DeprecationWarning,
) )
return selalt40mcp(msg) return selalt40fms(msg)