From 34465f4dd75429bffc4f8ff732915dd14a9e2d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Wed, 13 Sep 2017 16:11:24 +0100 Subject: otverio2015: fix _MEAL_CODES map. The unpacked value is an integer, not a byte array anymore. --- glucometerutils/drivers/otverio2015.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index 56870c2..d272b5c 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -76,9 +76,9 @@ _READ_RECORD_REQUEST_SUFFIX = b'\x00' _MEMORY_ERASE_REQUEST = b'\x04\x1a' _MEAL_CODES = { - b'\x00': common.NO_MEAL, - b'\x01': common.BEFORE_MEAL, - b'\x02': common.AFTER_MEAL, + 0x00: common.NO_MEAL, + 0x01: common.BEFORE_MEAL, + 0x02: common.AFTER_MEAL, } def _extract_message(register): -- cgit v1.2.3