diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2013-12-11 20:27:00 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2013-12-11 20:27:00 +0100 |
commit | 11766e45449a999a15c310ab048bc98db3abf8c7 (patch) | |
tree | ab381d64634c219fb26fc2a28936a496bc11e7fc /glucometerutils/drivers/otultra2.py | |
parent | otultra2: expose the meal and comments as separate field in the CSV. (diff) | |
download | glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.tar glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.tar.gz glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.tar.bz2 glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.tar.lz glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.tar.xz glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.tar.zst glucometerutils-11766e45449a999a15c310ab048bc98db3abf8c7.zip |
Diffstat (limited to '')
-rw-r--r-- | glucometerutils/drivers/otultra2.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py index 4539cc2..296e188 100644 --- a/glucometerutils/drivers/otultra2.py +++ b/glucometerutils/drivers/otultra2.py @@ -280,15 +280,14 @@ class Device(object): line_data = match.groupdict() date = self._parse_datetime(line_data['datetime']) - meal_str = self._MEAL_CODES[line_data['meal']] - comment_str = self._COMMENT_CODES[line_data['comment']] - comment = '"%s","%s"' % (meal_str, comment_str) + meal = self._MEAL_CODES[line_data['meal']] + comment = self._COMMENT_CODES[line_data['comment']] # OneTouch2 always returns the data in mg/dL even if the # glucometer is set to mmol/L. We need to convert it to the # requested unit here. yield common.Reading(date, int(line_data['value']), - common.UNIT_MGDL, comment=comment) + common.UNIT_MGDL, meal=meal, comment=comment) # The following two hashes are taken directly from LifeScan's documentation _MEAL_CODES = { |