diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-07-24 23:16:28 +0200 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-07-24 23:16:28 +0200 |
commit | f956feec452cd7c2a3287740173fd20414fe9ff0 (patch) | |
tree | d4d6334fe7b92137f34f826e240562f896603e90 | |
parent | fix invalid self-reference (diff) | |
download | glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.tar glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.tar.gz glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.tar.bz2 glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.tar.lz glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.tar.xz glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.tar.zst glucometerutils-f956feec452cd7c2a3287740173fd20414fe9ff0.zip |
-rw-r--r-- | glucometerutils/drivers/sdcodefree.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glucometerutils/drivers/sdcodefree.py b/glucometerutils/drivers/sdcodefree.py index ac3e228..4636d2a 100644 --- a/glucometerutils/drivers/sdcodefree.py +++ b/glucometerutils/drivers/sdcodefree.py @@ -46,7 +46,7 @@ _PACKET = construct.Struct( {e: e.value for e in Direction}), 'length' / construct.Rebuild( construct.Byte, lambda this: len(this.message) + 2), - 'message' / construct.Bytes(lambda this: len(this.message)), + 'message' / construct.Bytes(lambda this: this.length - 2), 'checksum' / construct.Checksum( construct.Byte, xor_checksum, construct.this.message), 'etx' / construct.Const(0xAA, construct.Byte) |