Skip to content

Commit ad3c296

Browse files
authored
Merge branch 'dev' into master
2 parents 75f966f + 3a621bd commit ad3c296

File tree

57 files changed

+510
-2760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+510
-2760
lines changed

Cartfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
github "LoopKit/LoopKit" == 2.1.3
2-
github "LoopKit/CGMBLEKit" == 2.1.1
3-
github "i-schuetz/SwiftCharts" == 0.6.2
4-
github "mddub/dexcom-share-client-swift" == 0.4.1
5-
github "mddub/G4ShareSpy" == 0.3.3
6-
github "ps2/rileylink_ios" == 2.0.6
1+
2+
github "LoopKit/LoopKit" "dev"
3+
github "LoopKit/CGMBLEKit" "dev"
4+
github "i-schuetz/SwiftCharts" == 0.6.1
5+
github "LoopKit/dexcom-share-client-swift" "carthage-recursive"
6+
github "LoopKit/G4ShareSpy" "fix-cartfile"
7+
github "ps2/rileylink_ios" "dev"
78
github "LoopKit/Amplitude-iOS" "decreepify"

Cartfile.resolved

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github "LoopKit/Amplitude-iOS" "2137d5fd44bf630ed33e1e72d7af6d8f8612f270"
2-
github "LoopKit/CGMBLEKit" "v2.1.1"
3-
github "LoopKit/LoopKit" "v2.1.3"
4-
github "i-schuetz/SwiftCharts" "0.6.2"
5-
github "mddub/G4ShareSpy" "v0.3.3"
6-
github "mddub/dexcom-share-client-swift" "v0.4.1"
7-
github "ps2/rileylink_ios" "v2.0.6"
2+
github "LoopKit/CGMBLEKit" "97433c2c546b50268bbfe2e1a42cb377c6066e78"
3+
github "LoopKit/G4ShareSpy" "47931f1ee70f1081db6eebf3a68bb8f4146e5fca"
4+
github "LoopKit/LoopKit" "8c553f7bd03c2032b146e4a52d58d527a4285c15"
5+
github "LoopKit/dexcom-share-client-swift" "f0125aed8960586a9473dca02d17b3e5969558ac"
6+
github "i-schuetz/SwiftCharts" "0.6.1"
7+
github "ps2/rileylink_ios" "9f62a563cc7e6ea17a3f3be3a3f351aba202d624"

Common/Extensions/UIColor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ extension UIColor {
2626

2727
@nonobjc static let unknownColor = UIColor(red: 198 / 255, green: 199 / 255, blue: 201 / 255, alpha: 1)
2828

29-
@nonobjc static let deleteColor = UIColor.HIGRedColor()
29+
static let delete = UIColor.HIGRedColor()
3030
}

Common/Extensions/UserDefaults+CGM.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,20 @@
66
//
77

88
import Foundation
9+
import LoopKit
910

1011

1112
extension UserDefaults {
1213
private enum Key: String {
13-
case cgmSettings = "com.loopkit.Loop.cgmSettings"
14+
case cgmManagerState = "com.loopkit.Loop.CGMManagerState"
1415
}
1516

16-
var cgm: CGM? {
17+
var cgmManagerState: CGMManager.RawStateValue? {
1718
get {
18-
if let rawValue = dictionary(forKey: Key.cgmSettings.rawValue) {
19-
return CGM(rawValue: rawValue)
20-
} else {
21-
return nil
22-
}
19+
return dictionary(forKey: Key.cgmManagerState.rawValue)
2320
}
2421
set {
25-
set(newValue?.rawValue, forKey: Key.cgmSettings.rawValue)
22+
set(newValue, forKey: Key.cgmManagerState.rawValue)
2623
}
2724
}
2825
}

Common/Models/CGM.swift

Lines changed: 0 additions & 102 deletions
This file was deleted.

Common/Models/WatchContext.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88

99
import Foundation
1010
import HealthKit
11+
import LoopKit
1112

1213
final class WatchContext: NSObject, RawRepresentable {
1314
typealias RawValue = [String: Any]
1415

15-
private let version = 3
16+
private let version = 4
1617

1718
var preferredGlucoseUnit: HKUnit?
1819
var maxBolus: Double?
@@ -42,7 +43,7 @@ final class WatchContext: NSObject, RawRepresentable {
4243
var reservoirPercentage: Double?
4344
var batteryPercentage: Double?
4445

45-
var cgm: CGM?
46+
var cgmManagerState: CGMManager.RawStateValue?
4647

4748
override init() {
4849
super.init()
@@ -93,9 +94,7 @@ final class WatchContext: NSObject, RawRepresentable {
9394
COB = rawValue["cob"] as? Double
9495
maxBolus = rawValue["mb"] as? Double
9596

96-
if let cgmRawValue = rawValue["cgm"] as? CGM.RawValue {
97-
cgm = CGM(rawValue: cgmRawValue)
98-
}
97+
cgmManagerState = rawValue["cgmManagerState"] as? CGMManager.RawStateValue
9998
}
10099

101100
var rawValue: RawValue {
@@ -107,7 +106,7 @@ final class WatchContext: NSObject, RawRepresentable {
107106
raw["bad"] = lastNetTempBasalDate
108107
raw["bp"] = batteryPercentage
109108

110-
raw["cgm"] = cgm?.rawValue
109+
raw["cgmManagerState"] = cgmManagerState
111110

112111
raw["cob"] = COB
113112

0 commit comments

Comments
 (0)