소스 검색

Support for new Dexcom One+ sensors

Connect using G7 manager in Open-iAPS
Sjoerd-Bo3 2 년 전
부모
커밋
d7b814e3d2
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Dependencies/G7SensorKit/G7SensorKit/G7CGMManager/G7Sensor.swift

+ 2 - 1
Dependencies/G7SensorKit/G7SensorKit/G7CGMManager/G7Sensor.swift

@@ -215,7 +215,8 @@ public final class G7Sensor: G7BluetoothManagerDelegate {
         }
         }
 
 
         /// The Dexcom G7 advertises a peripheral name of "DXCMxx", and later reports a full name of "Dexcomxx"
         /// The Dexcom G7 advertises a peripheral name of "DXCMxx", and later reports a full name of "Dexcomxx"
-        if name.hasPrefix("DXCM") {
+        /// Dexcom One+ peripheral name start with "DX02"
+        if name.hasPrefix("DXCM") || name.hasPrefix("DX02"){
             // If we're following this name or if we're scanning, connect
             // If we're following this name or if we're scanning, connect
             if let sensorName = sensorID, name.suffix(2) == sensorName.suffix(2) {
             if let sensorName = sensorID, name.suffix(2) == sensorName.suffix(2) {
                 return .makeActive
                 return .makeActive