diff options
-rw-r--r-- | README | 16 | ||||
-rw-r--r-- | glucometerutils/drivers/freestyle_optium.py | 9 |
2 files changed, 20 insertions, 5 deletions
@@ -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ò <flameeyes@flameeyes.eu> +Copyright © 2013-2016 Diego Elio Pettenò <flameeyes@flameeyes.eu> 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') |