summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-01-06 22:44:49 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-01-06 22:44:49 +0100
commit1aa5295890964b405a25d747d4f8471a7466b8a4 (patch)
tree583e179f6d6e1fd901135098a8563efb7d7deb66
parentotverioiq: add totally untested driver. (diff)
downloadglucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.tar
glucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.tar.gz
glucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.tar.bz2
glucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.tar.lz
glucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.tar.xz
glucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.tar.zst
glucometerutils-1aa5295890964b405a25d747d4f8471a7466b8a4.zip
-rw-r--r--glucometerutils/drivers/otultraeasy.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/glucometerutils/drivers/otultraeasy.py b/glucometerutils/drivers/otultraeasy.py
index fe7e4ae..aafc2bd 100644
--- a/glucometerutils/drivers/otultraeasy.py
+++ b/glucometerutils/drivers/otultraeasy.py
@@ -137,10 +137,11 @@ class Device(serial.SerialDevice):
# discard the checksum and copy
pkt = raw_pkt.value
- if not pkt.disconnect and pkt.sequence_number != self.expect_receive_:
+ if not pkt.link_control.disconnect and (
+ pkt.link_control.sequence_number != self.expect_receive_):
raise lifescan.MalformedCommand(
'at position 2[0b] expected %02x, received %02x' % (
- self.expect_receive_, pkt.sequence_count))
+ self.expect_receive_, pkt.link_connect.sequence_count))
return pkt
@@ -149,7 +150,7 @@ class Device(serial.SerialDevice):
def _read_ack(self):
pkt = self._read_packet()
- assert pkt.acknowledge
+ assert pkt.link_control.acknowledge
def _send_request(self, request_format, request_obj, response_format):
try:
@@ -160,7 +161,7 @@ class Device(serial.SerialDevice):
self._read_ack()
response_pkt = self._read_packet()
- assert not response_pkt.acknowledge
+ assert not response_pkt.link_control.acknowledge
self.expect_receive_ = not self.expect_receive_
self._send_ack()