From 59dfa88299c8473c4a4391bb256368047c990740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Tue, 9 Feb 2016 01:03:39 +0000 Subject: Update documentation, reference the new glucometer-protocols repository. Also update copyright year. --- README | 16 ++++++++++++---- glucometerutils/drivers/freestyle_optium.py | 9 ++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/README b/README index 5eefa6a..bde999f 100644 --- a/README +++ b/README @@ -4,9 +4,15 @@ Glucometer Utilities This utility I created for personal needs, as my glucometer's software can only print the software (to XPS) without a file export option. -While right now only supports the glucometers I own and for which I have -the specification of the protocol,I've tried designing it so that it can -be extended and used for other models and other brands as well. +While right now only supports the glucometers I own and for which I +have the specification of the protocol, I've tried designing it so +that it can be extended and used for other models and other brands as +well. + +If you have knowledge of a protocol of a glucometer you would have +supported, please provide a reference, possibly by writing a +specification and contribute it to +https://github.com/Flameeyes/glucometer-protocols/. Supported devices ----------------- @@ -17,6 +23,8 @@ Supported devices * **LifeScan OneTouch Ultra Easy** (also known as **Ultra Mini**): get information, get and set time, dump of readings in native units, memory reset. + * **Abbott FreeStyle Optium**: get information, get and set time, + dump of readings in native units. Dump format ----------- @@ -51,7 +59,7 @@ compatible. License ------- -Copyright © 2013 Diego Elio Pettenò +Copyright © 2013-2016 Diego Elio Pettenò Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/glucometerutils/drivers/freestyle_optium.py b/glucometerutils/drivers/freestyle_optium.py index d40a9a1..7f4e020 100644 --- a/glucometerutils/drivers/freestyle_optium.py +++ b/glucometerutils/drivers/freestyle_optium.py @@ -1,5 +1,10 @@ # -*- coding: utf-8 -*- -"""Driver for FreeStyle Optium devices""" +"""Driver for FreeStyle Optium devices. + +Further information on the device protocol can be found at + +https://github.com/Flameeyes/glucometer-protocols/blob/master/abbott/freestyle-optium.md +""" __author__ = 'Diego Elio Pettenò' __email__ = 'flameeyes@flameeyes.eu' @@ -94,6 +99,8 @@ class Device(object): self.serial_.flush() response = self.serial_.readlines() + print("%r" % response) + # We always want to decode the output, and remove stray \r\n. Any failure in # decoding means the output is invalid anyway. decoded_response = [line.decode('ascii').rstrip('\r\n') -- cgit v1.2.3