summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-01-07 15:06:32 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-01-07 15:06:32 +0100
commit6459cf5e810d826d558b5be80f83b1d0642cac2e (patch)
tree1ed0dc177ee85c7ae44a2d34d4be8816fb813dd7
parentotverioiq: fix typo. (diff)
downloadglucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.tar
glucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.tar.gz
glucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.tar.bz2
glucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.tar.lz
glucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.tar.xz
glucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.tar.zst
glucometerutils-6459cf5e810d826d558b5be80f83b1d0642cac2e.zip
-rw-r--r--glucometerutils/drivers/otverioiq.py10
1 files 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))