From b257c112a90d545f6ae00c6e44505142e84fa33d Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Tue, 29 Dec 2015 10:56:01 +0200 Subject: [PATCH 1/3] convert 554 to mg/dl for bolus wizard --- decocare/records/bolus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decocare/records/bolus.py b/decocare/records/bolus.py index 2044247..3923797 100644 --- a/decocare/records/bolus.py +++ b/decocare/records/bolus.py @@ -140,7 +140,7 @@ def decode(self): if self.MMOL_DEFAULT: for key in [ 'bg', 'bg_target_high', 'bg_target_low', 'sensitivity' ]: - wizard[key] = wizard[key] / 10.0 + wizard[key] = wizard[key] / * 1.8 // convert to mg/dl return wizard def insulin_decode (a, b, strokes=40.0): From a960908d89864f5ae46c06ffa2fa4e1566091e21 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Tue, 29 Dec 2015 11:23:29 +0200 Subject: [PATCH 2/3] fix typo --- decocare/records/bolus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decocare/records/bolus.py b/decocare/records/bolus.py index 3923797..eac8316 100644 --- a/decocare/records/bolus.py +++ b/decocare/records/bolus.py @@ -140,7 +140,7 @@ def decode(self): if self.MMOL_DEFAULT: for key in [ 'bg', 'bg_target_high', 'bg_target_low', 'sensitivity' ]: - wizard[key] = wizard[key] / * 1.8 // convert to mg/dl + wizard[key] = wizard[key] * 1.8 // convert to mg/dl return wizard def insulin_decode (a, b, strokes=40.0): From def51ac8259610f01ef5db4d72d9c22585b067e0 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Tue, 29 Dec 2015 11:26:56 +0200 Subject: [PATCH 3/3] Doh wrong comment --- decocare/records/bolus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decocare/records/bolus.py b/decocare/records/bolus.py index eac8316..b9980b3 100644 --- a/decocare/records/bolus.py +++ b/decocare/records/bolus.py @@ -140,7 +140,7 @@ def decode(self): if self.MMOL_DEFAULT: for key in [ 'bg', 'bg_target_high', 'bg_target_low', 'sensitivity' ]: - wizard[key] = wizard[key] * 1.8 // convert to mg/dl + wizard[key] = wizard[key] * 1.8 # convert to mg/dl return wizard def insulin_decode (a, b, strokes=40.0):