Browse Source

Glucose Direct

Jon Mårtensson 4 years ago
parent
commit
1f678d7a00

+ 1 - 0
FreeAPS/Resources/Info.plist

@@ -40,6 +40,7 @@
 		<string>dexcomcgm</string>
 		<string>diabox</string>
 		<string>spikeapp</string>
+		<string>libredirect</string>
 	</array>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>

+ 5 - 0
FreeAPS/Sources/APS/CGM/CGMType.swift

@@ -9,6 +9,7 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
     case dexcomG5
     case simulator
     case libreTransmitter
+    case glucoseDirect
 
     var displayName: String {
         switch self {
@@ -16,6 +17,8 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
             return "Nightscout"
         case .xdrip:
             return "xDrip"
+        case .glucoseDirect:
+            return "Glucose Direct"
         case .dexcomG6:
             return "Dexcom G6"
         case .dexcomG5:
@@ -33,6 +36,8 @@ enum CGMType: String, JSON, CaseIterable, Identifiable {
             return nil
         case .xdrip:
             return URL(string: "xdripswift://")!
+        case .glucoseDirect:
+            return URL(string: "libredirect://")!
         case .dexcomG6:
             return URL(string: "dexcomg6://")!
         case .dexcomG5:

+ 2 - 0
FreeAPS/Sources/APS/FetchGlucoseManager.swift

@@ -41,6 +41,8 @@ final class BaseFetchGlucoseManager: FetchGlucoseManager, Injectable {
             glucoseSource = simulatorSource
         case .libreTransmitter:
             glucoseSource = libreTransmitter
+        case .glucoseDirect:
+            glucoseSource = appGroupSource
         }
 
         if settingsManager.settings.cgm != .libreTransmitter {