Add leading zeros

This commit is contained in:
Marianpol 2020-10-28 13:05:11 +01:00
parent a05464b231
commit b20d6a9e72

View File

@ -156,6 +156,8 @@ def getHexVal(m, startByte, startBit, resp, raw = 0):
#add left zero if need
if len(hexval)%2:
hexval = '0'+hexval
if (len(hexval)/2)%bytes:
hexval = '00' * (bytes - len(hexval)/2) + hexval
#revert byte order if little endian
if m.littleEndian == '1':