From 4a899365db3368db4738e0e572ee5a8d58a13737 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 3 Dec 2021 19:29:45 +0100 Subject: [PATCH] Poctech: fix unit conversion --- .../nightscout/androidaps/plugins/source/PoctechPlugin.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt index d17bef33e6..f6442181fb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt @@ -70,8 +70,8 @@ class PoctechPlugin @Inject constructor( val json = jsonArray.getJSONObject(i) glucoseValues += CgmSourceTransaction.TransactionGlucoseValue( timestamp = json.getLong("date"), - value = if (safeGetString(json, "units", Constants.MGDL) == "mmol/L") json.getDouble("current") - else json.getDouble("current") * Constants.MMOLL_TO_MGDL, + value = if (safeGetString(json, "units", Constants.MGDL) == "mmol/L") json.getDouble("current") * Constants.MMOLL_TO_MGDL + else json.getDouble("current"), raw = json.getDouble("raw"), noise = null, trendArrow = GlucoseValue.TrendArrow.fromString(json.getString("direction")),