From 6459cf5e810d826d558b5be80f83b1d0642cac2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 7 Jan 2018 14:06:32 +0000 Subject: otverioiq: fix up syntax. --- glucometerutils/drivers/otverioiq.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py index cf2bc39..8cc8051 100644 --- a/glucometerutils/drivers/otverioiq.py +++ b/glucometerutils/drivers/otverioiq.py @@ -33,7 +33,7 @@ _VERSION_RESPONSE = construct.Struct( lifescan_binary_protocol.COMMAND_SUCCESS, 'version' / construct.PascalString(construct.Byte, encoding='ascii'), # NULL-termination is not included in string length. - construct.Constant('\x00'), + construct.Const('\x00'), ) _SERIAL_NUMBER_REQUEST = construct.Const( @@ -105,8 +105,7 @@ class Device(serial.SerialDevice): def __init__(self, device): super(Device, self).__init__(device) - self.buffered_reader_ = construct.Rebuffered( - lifescan_binary_protocol.PACKET, tailcutoff=1024) + self.buffered_reader_ = construct.Rebuffered(_PACKET, tailcutoff=1024) def connect(self): pass @@ -115,10 +114,9 @@ class Device(serial.SerialDevice): pass def _send_packet(self, message): - pkt = lifescan_binary_protocol.PACKET.build( + pkt = _PACKET.build( {'value': { - 'message': request, - 'link_control': {}, # Verio does not use link_control. + 'message': message, }}) logging.debug('sending packet: %s', binascii.hexlify(pkt)) -- cgit v1.2.3