We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ec8afb commit f68fc0eCopy full SHA for f68fc0e
Loop/Managers/NightscoutDataManager.swift
@@ -161,7 +161,13 @@ final class NightscoutDataManager {
161
}
162
163
if let loopEventualBGquantity = predictedGlucose?.last?.quantity, let userUnit = deviceDataManager.loopManager.settings.glucoseTargetRangeSchedule?.unit {
164
- loopEventualBG = String(Int(loopEventualBGquantity.doubleValue(for: userUnit)))
+ if userUnit == HKUnit.milligramsPerDeciliter() {
165
+ loopEventualBG = String(Int(loopEventualBGquantity.doubleValue(for: userUnit)))
166
+ }
167
+ else
168
+ {
169
+ loopEventualBG = String(format:"%.1f",loopEventualBGquantity.doubleValue(for: userUnit))
170
171
172
else
173
{
0 commit comments