From 27fbd88b5e14564a1980c612d86812487640027a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Caldas?= Date: Sat, 4 May 2019 11:55:05 -0300 Subject: Bug fix: incorrect argument order in call to construct.Const. --- glucometerutils/support/freestyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py index 816af81..1c5e284 100644 --- a/glucometerutils/support/freestyle.py +++ b/glucometerutils/support/freestyle.py @@ -28,7 +28,7 @@ from glucometerutils.support import hiddevice _INIT_SEQUENCE = (0x04, 0x05, 0x15, 0x01) _FREESTYLE_MESSAGE = construct.Struct( - 'hid_report' / construct.Const(0, construct.Byte), + 'hid_report' / construct.Const(construct.Byte, 0), 'message_type' / construct.Byte, 'command' / construct.Padded( 63, # command can only be up to 62 bytes, but one is used for length. -- cgit v1.2.3