From eee15bab2a7c2c80e240c81b139c40ae17f41b16 Mon Sep 17 00:00:00 2001 From: "Wesley T. Honeycutt" Date: Tue, 22 May 2018 16:38:46 -0500 Subject: Fix for non-integer errors This is a quick fix I used to address an error for "HI" readings on my unit. This comes up when testing inhuman blood. There may be a "LO", but I have not encountered it, so I do not know how the specifics of it. This error may come up on other units, but I have just done something about the hardware I have access to. --- glucometerutils/drivers/fsprecisionneo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/glucometerutils/drivers/fsprecisionneo.py b/glucometerutils/drivers/fsprecisionneo.py index cb58263..296c943 100644 --- a/glucometerutils/drivers/fsprecisionneo.py +++ b/glucometerutils/drivers/fsprecisionneo.py @@ -81,7 +81,11 @@ class Device(freestyle.FreeStyleHidDevice): # Build a _reading object by parsing each of the entries in the raw # record - values = [int(v) for v in record] + values = [] + for v in record: + if v == "HI": + v = 999 + values.append(int(v)) raw_reading = _NeoReading._make(values[:len(_NeoReading._fields)]) timestamp = datetime.datetime( -- cgit v1.2.3