From c7aac3cd64a342eecdef30a1eab51036da7b8a04 Mon Sep 17 00:00:00 2001 From: Darin Krauss Date: Mon, 15 Jun 2020 11:41:59 -0700 Subject: [PATCH] LOOP-1361 Capture manually entered BG reading (#10) - https://tidepool.atlassian.net/browse/LOOP-1361 - Use TSMBGDatum type if glucose is user entered --- TidepoolServiceKit/Extensions/StoredGlucoseSample.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TidepoolServiceKit/Extensions/StoredGlucoseSample.swift b/TidepoolServiceKit/Extensions/StoredGlucoseSample.swift index 8e77a0e..d5efe70 100644 --- a/TidepoolServiceKit/Extensions/StoredGlucoseSample.swift +++ b/TidepoolServiceKit/Extensions/StoredGlucoseSample.swift @@ -13,6 +13,8 @@ extension StoredGlucoseSample { var datum: TDatum { if isDisplayOnly { return TCalibrationDeviceEventDatum(time: datumTime, value: datumValue, units: datumUnits).adorn(withOrigin: datumOrigin) + } else if wasUserEntered { + return TSMBGDatum(time: datumTime, value: datumValue, units: datumUnits, subType: .manual).adorn(withOrigin: datumOrigin) } else { return TCBGDatum(time: datumTime, value: datumValue, units: datumUnits).adorn(withOrigin: datumOrigin) }