diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2013-12-11 20:39:27 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2013-12-11 20:39:27 +0100 |
commit | 3d5618f3f81e07859861c2f3c06cc5c4e877b905 (patch) | |
tree | a7f7af21012eeff6b23ee71fa928533fe00e0657 /glucometerutils/drivers/otultra2.py | |
parent | glucometer.py: if no unit is provided on command line, use the default of the meter. (diff) | |
download | glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.tar glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.tar.gz glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.tar.bz2 glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.tar.lz glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.tar.xz glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.tar.zst glucometerutils-3d5618f3f81e07859861c2f3c06cc5c4e877b905.zip |
Diffstat (limited to '')
-rw-r--r-- | glucometerutils/drivers/otultra2.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py index 296e188..1a7b794 100644 --- a/glucometerutils/drivers/otultra2.py +++ b/glucometerutils/drivers/otultra2.py @@ -283,11 +283,10 @@ class Device(object): 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, meal=meal, comment=comment) + # OneTouch2 always returns the data in mg/dL even if the glucometer is set + # to mmol/L, so there is no conversion required. + yield common.Reading( + date, float(line_data['value']), meal=meal, comment=comment) # The following two hashes are taken directly from LifeScan's documentation _MEAL_CODES = { |