unknown dataId fix

This commit is contained in:
shrlnm 2020-03-01 18:17:03 +03:00
parent 3f23d862a7
commit 2c2e10abd9
2 changed files with 8 additions and 0 deletions

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -82,6 +82,8 @@ def get_SnapShotMnemonic(m, se, elm, dataids):
for x in range(numberOfIdentifiers):
dataId = resp[posInResp:posInResp + 2*3].replace(" ", "")
posInResp += 2*3
if dataId not in dataids.keys():
continue
didDataLength = int(dataids[dataId].dataBitLength)/8
didData = resp[posInResp: posInResp + didDataLength*3]
posInResp += didDataLength*3