Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8eae264
Bump Loop version to 2.1 for dev
ps2 Jan 8, 2020
71b4f41
Increase history interval for carb cache
ps2 Jan 12, 2020
0a19eff
Include current bg when considering suspend threshold and dosing thre…
ps2 Jan 12, 2020
012aa23
Include insulin model delay in computation of dose
dm61 Jan 14, 2020
c45caaa
Fix dose math tests
dm61 Jan 14, 2020
169b429
Merge pull request #1234 from LoopKit/carb-cache-length
ps2 Jan 16, 2020
b944488
Merge pull request #1235 from LoopKit/current-bg-dosing-thresholds
ps2 Jan 16, 2020
40ae183
add delay to insulin model presets
dm61 Jan 18, 2020
824fe6a
Merge pull request #1242 from dm61/insulin-model-delay
ps2 Jan 19, 2020
08a6f35
Bump carthage revs
ps2 Jan 19, 2020
a1fc115
Unify carb entry + bolus flow
mpangburn Dec 28, 2019
50562ca
Alert on bolus recommendation change
mpangburn Dec 29, 2019
ca8d2fa
Recompute RC when considering past carb entry
mpangburn Jan 8, 2020
4e6eef5
Update comments re carb entry chart
mpangburn Jan 8, 2020
25f87d1
Visual updates per review
mpangburn Jan 15, 2020
3a608dc
Include pending insulin in prediction charts
mpangburn Jan 16, 2020
df69421
Don't predict glucose with stale data
mpangburn Jan 18, 2020
824f90a
Updates for merge with dev.
ps2 Jan 20, 2020
f5aaf1e
Update Loop to compile with LoopKit carb effects update
ps2 Jan 21, 2020
1fab955
Bump LoopKit cartfile rev
ps2 Jan 21, 2020
c21180d
Bolus recommendations include pending insulin
mpangburn Jan 21, 2020
9faec59
Updates from review
mpangburn Jan 23, 2020
7964109
Bump carthage revisions
ps2 Jan 26, 2020
9728519
Merge dev
ps2 Jan 26, 2020
49977fc
Fix log style
ps2 Jan 26, 2020
044781f
Merge pull request #1244 from LoopKit/carb-entry-flow
ps2 Jan 27, 2020
ebd939a
Fix interval multiple for dose chart y axis (#1245)
ps2 Jan 27, 2020
ffd40d7
Include pending insulin in watch prediction (#47)
mpangburn Jan 31, 2020
78f4bea
Visual tweaks from DIY
mpangburn Jan 29, 2020
b6c1573
Align continue button text
mpangburn Jan 29, 2020
05af23d
Incorporate sleep data into complication user info transfer calculati…
novalegra Feb 4, 2020
b278507
Fix incorrect carb effect in bolus prediction
mpangburn Feb 7, 2020
ed7bf7f
fix nightscout trend arrows (#1274)
dabear Feb 25, 2020
9da678d
Denote stale glucose as three dashes (#1275)
ps2 Feb 29, 2020
149216c
Support enacting manual loop if loop error (#1252)
mpangburn Feb 29, 2020
a1e9ef6
Chore: Updated Swedish (sv) translations. (#1280)
hummelstrand Mar 22, 2020
e5d788a
Update cartfile revs
ps2 Mar 22, 2020
55766fa
Persistent device logs (#1289)
ps2 Apr 1, 2020
b18f0c1
Put device logs database files in separate directory
ps2 Apr 1, 2020
298a9cc
Bump carthage revs
ps2 Apr 1, 2020
eb0277d
Add warning when user attempts to edit basal schedule without a confi…
novalegra Apr 1, 2020
0d66a8a
Finnish translations update (#1291)
mylma Apr 1, 2020
13b35e2
Update HealthKit usage description (#1294)
novalegra Apr 3, 2020
ac77834
Bump carthage revs
ps2 Apr 4, 2020
445ae98
FI: Add a missing Carb Entry translation (#1303)
mylma Apr 18, 2020
3d42779
Dispatch dosestore completions back to main (#1302)
ps2 Apr 18, 2020
d14a282
Bump carthage revs
ps2 Apr 18, 2020
8850217
Merge branch 'master' into dev
ps2 Apr 18, 2020
2388969
Bump version for release
ps2 Apr 18, 2020
c6c0839
Reset DEVELOPMENT_TEAM
ps2 Apr 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "LoopKit/LoopKit" ~> 3.0
github "LoopKit/CGMBLEKit" ~> 3.2
github "LoopKit/LoopKit" "dev"
github "LoopKit/CGMBLEKit" "dev"
github "i-schuetz/SwiftCharts" == 0.6.5
github "LoopKit/dexcom-share-client-swift" ~> 1.2
github "LoopKit/G4ShareSpy" ~> 1.1
github "ps2/rileylink_ios" ~> 3.0
github "LoopKit/dexcom-share-client-swift" "dev"
github "LoopKit/G4ShareSpy" "dev"
github "ps2/rileylink_ios" "dev"
github "LoopKit/Amplitude-iOS" "decreepify"
10 changes: 5 additions & 5 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github "LoopKit/Amplitude-iOS" "2137d5fd44bf630ed33e1e72d7af6d8f8612f270"
github "LoopKit/CGMBLEKit" "v3.2"
github "LoopKit/G4ShareSpy" "v1.1"
github "LoopKit/LoopKit" "v3.0"
github "LoopKit/CGMBLEKit" "edcf503ef8fe260b69ca98eae508e679dfd9ad69"
github "LoopKit/G4ShareSpy" "88c5a296e83ce618319ae365a7e6da76d9be126b"
github "LoopKit/LoopKit" "6940ab10d258b21e0a33aa5729b1111a8d332d77"
github "LoopKit/MKRingProgressView" "f548a5c64832be2d37d7c91b5800e284887a2a0a"
github "LoopKit/dexcom-share-client-swift" "v1.2"
github "LoopKit/dexcom-share-client-swift" "c37d87fcf121c44721e87c9e6d2bea94e48728cc"
github "i-schuetz/SwiftCharts" "0.6.5"
github "ps2/rileylink_ios" "v3.0"
github "ps2/rileylink_ios" "c33115c038a7d133234cfa8b73c80603ff10a599"
12 changes: 12 additions & 0 deletions Common/Models/WatchContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ final class WatchContext: RawRepresentable {
var glucose: HKQuantity?
var glucoseTrendRawValue: Int?
var glucoseDate: Date?
var glucoseSyncIdentifier: String?

var predictedGlucose: WatchPredictedGlucose?
var eventualGlucose: HKQuantity? {
Expand Down Expand Up @@ -58,6 +59,7 @@ final class WatchContext: RawRepresentable {

glucoseTrendRawValue = rawValue["gt"] as? Int
glucoseDate = rawValue["gd"] as? Date
glucoseSyncIdentifier = rawValue["gs"] as? String
iob = rawValue["iob"] as? Double
reservoir = rawValue["r"] as? Double
reservoirPercentage = rawValue["rp"] as? Double
Expand Down Expand Up @@ -95,6 +97,7 @@ final class WatchContext: RawRepresentable {

raw["gt"] = glucoseTrendRawValue
raw["gd"] = glucoseDate
raw["gs"] = glucoseSyncIdentifier
raw["iob"] = iob
raw["ld"] = loopLastRunDate
raw["r"] = reservoir
Expand All @@ -117,3 +120,12 @@ extension WatchContext {
}
}
}

extension WatchContext {
var newGlucoseSample: NewGlucoseSample? {
if let quantity = glucose, let date = glucoseDate, let syncIdentifier = glucoseSyncIdentifier {
return NewGlucoseSample(date: date, quantity: quantity, isDisplayOnly: false, syncIdentifier: syncIdentifier, syncVersion: 0)
}
return nil
}
}
2 changes: 1 addition & 1 deletion Common/sv.lproj/Intents.strings
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"OcNxIj" = "Lägg till kolhydrater";

/* (No Comment) */
"yc02Yq" = "Lägg till kolhydrater för att loopa";
"yc02Yq" = "Lägg till kolhydrater för att kunna loopa";

4 changes: 2 additions & 2 deletions Common/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"Maximum" = "Maximum";

/* The short unit display string for milligrams of glucose per decilter */
"mg/dL" = "mg/dL";
"mg/dL" = "mg/dl";

/* Placeholder for lower range entry */
"Minimum" = "Minimum";

/* The short unit display string for millimoles of glucose per liter */
"mmol/L" = "mmol/L";
"mmol/L" = "mmol/l";

/* Lesson title */
"Modal Day" = "Genomsnittlig dag";
Expand Down
22 changes: 11 additions & 11 deletions DoseMathTests/DoseMathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class RecommendTempBasalTests: XCTestCase {
lastTempBasal: nil
)

XCTAssertEqual(1.425, dose!.unitsPerHour, accuracy: 1.0 / 40.0)
XCTAssertEqual(1.60, dose!.unitsPerHour, accuracy: 1.0 / 40.0)
XCTAssertEqual(TimeInterval(minutes: 30), dose!.duration)
}

Expand All @@ -365,7 +365,7 @@ class RecommendTempBasalTests: XCTestCase {
lastTempBasal: nil
)

XCTAssertEqual(1.475, dose!.unitsPerHour, accuracy: 1.0 / 40.0)
XCTAssertEqual(1.60, dose!.unitsPerHour, accuracy: 1.0 / 40.0)
XCTAssertEqual(TimeInterval(minutes: 30), dose!.duration)
}

Expand Down Expand Up @@ -588,7 +588,7 @@ class RecommendBolusTests: XCTestCase {
volumeRounder: fortyIncrementsPerUnitRounder
)

XCTAssertEqual(1.575, dose.amount)
XCTAssertEqual(1.7, dose.amount)

if case BolusRecommendationNotice.currentGlucoseBelowTarget(let glucose) = dose.notice! {
XCTAssertEqual(glucose.quantity.doubleValue(for: .milligramsPerDeciliter), 60)
Expand Down Expand Up @@ -657,7 +657,7 @@ class RecommendBolusTests: XCTestCase {
volumeRounder: fortyIncrementsPerUnitRounder
)

XCTAssertEqual(1.4, dose.amount)
XCTAssertEqual(1.575, dose.amount)
XCTAssertEqual(BolusRecommendationNotice.predictedGlucoseBelowTarget(minGlucose: glucose[1]), dose.notice!)
}

Expand All @@ -676,7 +676,7 @@ class RecommendBolusTests: XCTestCase {
volumeRounder: fortyIncrementsPerUnitRounder
)

XCTAssertEqual(0.575, dose.amount)
XCTAssertEqual(0.7, dose.amount)
}

func testStartVeryLowEndHigh() {
Expand Down Expand Up @@ -708,7 +708,7 @@ class RecommendBolusTests: XCTestCase {
maxBolus: maxBolus
)

XCTAssertEqual(1.575, dose.amount, accuracy: 1.0 / 40.0)
XCTAssertEqual(1.7, dose.amount, accuracy: 1.0 / 40.0)
}

func testHighAndFalling() {
Expand All @@ -724,7 +724,7 @@ class RecommendBolusTests: XCTestCase {
maxBolus: maxBolus
)

XCTAssertEqual(0.325, dose.amount, accuracy: 1.0 / 40.0)
XCTAssertEqual(0.4, dose.amount, accuracy: 1.0 / 40.0)
}

func testInRangeAndRising() {
Expand All @@ -740,7 +740,7 @@ class RecommendBolusTests: XCTestCase {
maxBolus: maxBolus
)

XCTAssertEqual(0.325, dose.amount, accuracy: 1.0 / 40.0)
XCTAssertEqual(0.4, dose.amount, accuracy: 1.0 / 40.0)

// Less existing temp

Expand Down Expand Up @@ -771,7 +771,7 @@ class RecommendBolusTests: XCTestCase {
volumeRounder: fortyIncrementsPerUnitRounder
)

XCTAssertEqual(0.275, dose.amount)
XCTAssertEqual(0.375, dose.amount)
}

func testHighAndRising() {
Expand All @@ -787,7 +787,7 @@ class RecommendBolusTests: XCTestCase {
maxBolus: maxBolus
)

XCTAssertEqual(1.25, dose.amount)
XCTAssertEqual(1.35, dose.amount, accuracy: 1.0 / 40.0)

// Use mmol sensitivity value
let insulinSensitivitySchedule = InsulinSensitivitySchedule(unit: HKUnit.millimolesPerLiter, dailyItems: [RepeatingScheduleValue(startTime: 0.0, value: 10.0 / 3)])!
Expand All @@ -802,7 +802,7 @@ class RecommendBolusTests: XCTestCase {
maxBolus: maxBolus
)

XCTAssertEqual(1.25, dose.amount, accuracy: 1.0 / 40.0)
XCTAssertEqual(1.35, dose.amount, accuracy: 1.0 / 40.0)
}

func testRiseAfterDIA() {
Expand Down
10 changes: 5 additions & 5 deletions DoseMathTests/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Message when offering bolus recommendation even though bg is below range. (1: glucose value) */
"Current glucose of %1$@ is below correction range." = "Current glucose of %1$@ is below correction range.";
"Current glucose of %1$@ is below correction range." = "Nuvarande glukosvärde %1$@ är under målvärdet.";

/* The short unit display string for decibles */
"dB" = "dB";
Expand All @@ -8,16 +8,16 @@
"g" = "g";

/* The short unit display string for milligrams of glucose per decilter */
"mg/dL" = "mg/dL";
"mg/dL" = "mg/dl";

/* The short unit display string for millimoles of glucose per liter */
"mmol/L" = "mmol/L";
"mmol/L" = "mmol/l";

/* Message when offering bolus recommendation even though bg is below range and minBG is in future. (1: glucose time)(2: glucose number) */
"Predicted glucose at %1$@ is %2$@." = "Predicted glucose at %1$@ is %2$@.";
"Predicted glucose at %1$@ is %2$@." = "Förväntat glukosvärde vid %1$@ är %2$@.";

/* Notice message when recommending bolus when BG is below the suspend threshold. (1: glucose value) */
"Predicted glucose of %1$@ is below your suspend threshold setting." = "Predicted glucose of %1$@ is below your suspend threshold setting.";
"Predicted glucose of %1$@ is below your suspend threshold setting." = "Det förväntade slutglukosvärdet %1$@ är under ditt angivna tröskelvärde.";

/* Format string for combining localized numeric value and unit. (1: numeric value)(2: unit) */
"QUANTITY_VALUE_AND_UNIT" = "%1$@ %2$@";
Expand Down
2 changes: 1 addition & 1 deletion Learn/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSHealthShareUsageDescription</key>
<string>Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation.</string>
<string>Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to optimize delivery of Apple Watch complication updates during the time you are awake.</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
3 changes: 3 additions & 0 deletions Learn/fi.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* Privacy - Health Share Usage Description */
"NSHealthShareUsageDescription" = "Terveys-sovelluksen ateriatietoja käytetään glukoosivaikutusten määrittämiseen. Terveys-sovelluksen glukoositietoja käytetään graafeissa ja laskelmissa.";

2 changes: 1 addition & 1 deletion Learn/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"Time in Range" = "Tid inom målvärde";

/* Lesson subtitle */
"Visualizes the most frequent glucose values by time of day" = "Visar de vanligaste glukosvärdena under olika tider på dagen";
"Visualizes the most frequent glucose values by time of day" = "Visar de vanligaste glukosvärdena under olika tider på dygnet";

/* Unit string for a count of calendar weeks */
"Weeks" = "Veckor";
Expand Down
2 changes: 1 addition & 1 deletion Learn/sv.lproj/Main.strings
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* Class = "UINavigationItem"; title = "Learn"; ObjectID = "8hF-Ij-B7m"; */
"8hF-Ij-B7m.title" = "Learn";
"8hF-Ij-B7m.title" = "Utbildning";

3 changes: 2 additions & 1 deletion Loop Status Extension/StatusViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,12 @@ class StatusViewController: UIViewController, NCWidgetProviding {
return
}

if let lastGlucose = glucose.last {
if let lastGlucose = glucose.last, let recencyInterval = defaults.loopSettings?.inputDataRecencyInterval {
self.hudView.glucoseHUD.setGlucoseQuantity(
lastGlucose.quantity.doubleValue(for: unit),
at: lastGlucose.startDate,
unit: unit,
staleGlucoseAge: recencyInterval,
sensor: context.sensor
)
}
Expand Down
2 changes: 1 addition & 1 deletion Loop Status Extension/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* The subtitle format describing eventual glucose. (1: localized glucose value description) */
"Eventually %1$@" = "Eventuellt %1$@";
"Eventually %1$@" = "Förväntat %1$@";

/* The subtitle format describing units of active insulin. (1: localized insulin value description) */
"IOB %1$@ U" = "IOB %1$@ E";
Expand Down
2 changes: 1 addition & 1 deletion Loop Status Extension/sv.lproj/MainInterface.strings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Class = "UILabel"; text = "Eventually 92 mg/dL"; ObjectID = "9iF-xY-Bh4"; */
"9iF-xY-Bh4.text" = "Eventuellt 92 mg/dL";
"9iF-xY-Bh4.text" = "Förväntat 5,1 mmol/l";

/* Class = "UILabel"; text = "IOB 1.0 U"; ObjectID = "UPi-dG-yYD"; */
"UPi-dG-yYD.text" = "IOB 1.0 E";
Expand Down
2 changes: 1 addition & 1 deletion Loop.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
MAIN_APP_BUNDLE_IDENTIFIER = com.${DEVELOPMENT_TEAM}.loopkit
MAIN_APP_DISPLAY_NAME = Loop

LOOP_MARKETING_VERSION = 2.0
LOOP_MARKETING_VERSION = 2.2.0

APPICON_NAME = AppIcon

Expand Down
Loading