update to mmol NS handling of BG Checks (clarification)

This commit is contained in:
Paul Plant 2022-05-23 18:23:53 +02:00
parent 57db5cd0fd
commit f0d65ae0db
2 changed files with 2 additions and 1 deletions

View File

@ -282,7 +282,7 @@ public class TreatmentEntry: NSManagedObject, Comparable {
case .BgCheck: case .BgCheck:
dict["eventType"] = "BG Check" // maybe overwritten in next statement dict["eventType"] = "BG Check" // maybe overwritten in next statement
dict["glucose"] = self.value dict["glucose"] = self.value
dict["glucoseType"] = "Finger" dict["glucoseType"] = "Finger" + String(!UserDefaults.standard.bloodGlucoseUnitIsMgDl ? ": " + self.value.mgdlToMmolAndToString(mgdl: UserDefaults.standard.bloodGlucoseUnitIsMgDl) + " " + Texts_Common.mmol : "")
dict["units"] = ConstantsNightScout.mgDlNightscoutUnitString dict["units"] = ConstantsNightScout.mgDlNightscoutUnitString
default: default:
break break

View File

@ -604,6 +604,7 @@ public class NightScoutUploadManager: NSObject {
case .BgCheck: case .BgCheck:
treatmentToUploadToNightscoutAsDictionary["glucose"] = otherTreatmentEntry.value treatmentToUploadToNightscoutAsDictionary["glucose"] = otherTreatmentEntry.value
treatmentToUploadToNightscoutAsDictionary["units"] = ConstantsNightScout.mgDlNightscoutUnitString treatmentToUploadToNightscoutAsDictionary["units"] = ConstantsNightScout.mgDlNightscoutUnitString
treatmentToUploadToNightscoutAsDictionary["glucoseType"] = "Finger" + String(!UserDefaults.standard.bloodGlucoseUnitIsMgDl ? ": " + otherTreatmentEntry.value.mgdlToMmolAndToString(mgdl: UserDefaults.standard.bloodGlucoseUnitIsMgDl) + " " + Texts_Common.mmol : "")
default: default:
break break