Merge pull request #12090 from sfromis/patch-1

Expand decode-status to support all feature bits
This commit is contained in:
Theo Arends 2021-05-12 19:03:17 +02:00 committed by GitHub
commit ae6b81b047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -337,7 +337,11 @@ def StartDecode():
if "StatusMEM" in obj:
if "Features" in obj["StatusMEM"]:
features = []
for f in range(7):
maxfeatures = len(obj["StatusMEM"]["Features"])
if maxfeatures > len(a_features):
print("decode-status.py too old, does not support all feature bits")
maxfeatures = min(maxfeatures, len(a_features))
for f in range(maxfeatures + 1):
feature = obj["StatusMEM"]["Features"][f]
i_feature = int(feature,16)
if f == 0: