polscm32 1 рік тому
батько
коміт
2862e00ee9

+ 3 - 0
Trio.xcworkspace/contents.xcworkspacedata

@@ -14,6 +14,9 @@
       location = "group:OmniBLE/OmniBLE.xcodeproj">
       location = "group:OmniBLE/OmniBLE.xcodeproj">
    </FileRef>
    </FileRef>
    <FileRef
    <FileRef
+      location = "group:DanaKit/DanaKit.xcodeproj">
+   </FileRef>
+   <FileRef
       location = "group:RileyLinkKit/RileyLinkKit.xcodeproj">
       location = "group:RileyLinkKit/RileyLinkKit.xcodeproj">
    </FileRef>
    </FileRef>
    <FileRef
    <FileRef

+ 1 - 1
Trio.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -1,5 +1,5 @@
 {
 {
-  "originHash" : "59ac7eba66375d6eb406e758cb0b9964f4b3b0ae45c5665596f00384c32262b9",
+  "originHash" : "52d77fc35af7fe71614051dee0b291e2a0d38522eac7ae4d37d2442e81c7530c",
   "pins" : [
   "pins" : [
     {
     {
       "identity" : "cryptoswift",
       "identity" : "cryptoswift",

+ 0 - 35
Trio/Sources/APS/APSManager.swift

@@ -1136,41 +1136,6 @@ final class BaseAPSManager: APSManager, Injectable {
         }
         }
     }
     }
 
 
-//    private func tddForStats() async -> (currentTDD: Decimal, tddTotalAverage: Decimal) {
-//        let requestTDD = TDDStored.fetchRequest() as NSFetchRequest<NSFetchRequestResult>
-//        let sort = NSSortDescriptor(key: "timestamp", ascending: false)
-//        let daysOf14Ago = Date().addingTimeInterval(-14.days.timeInterval)
-//        requestTDD.predicate = NSPredicate(format: "date > %@", daysOf14Ago as NSDate)
-//        requestTDD.sortDescriptors = [sort]
-//        requestTDD.propertiesToFetch = ["date", "total"]
-//        requestTDD.resultType = .dictionaryResultType
-//
-//        var currentTDD: Decimal = 0
-//        var tddTotalAverage: Decimal = 0
-//
-//        let results = await privateContext.perform {
-//            do {
-//                let fetchedResults = try self.privateContext.fetch(requestTDD) as? [[String: Any]]
-//                return fetchedResults ?? []
-//            } catch {
-//                debugPrint("\(DebuggingIdentifiers.failed) \(#file) \(#function) Failed to get TDD Data for Statistics Upload")
-//                return []
-//            }
-//        }
-//
-//        if !results.isEmpty {
-//            if let latestTDD = results.first?["total"] as? NSDecimalNumber {
-//                currentTDD = latestTDD.decimalValue
-//            }
-//            let tddArray = results.compactMap { ($0["total"] as? NSDecimalNumber)?.decimalValue }
-//            if !tddArray.isEmpty {
-//                tddTotalAverage = tddArray.reduce(0, +) / Decimal(tddArray.count)
-//            }
-//        }
-//
-//        return (currentTDD, tddTotalAverage)
-//    }
-
     private func glucoseForStats() async -> (
     private func glucoseForStats() async -> (
         oneDayGlucose: (ifcc: Double, ngsp: Double, average: Double, median: Double, sd: Double, cv: Double, readings: Double),
         oneDayGlucose: (ifcc: Double, ngsp: Double, average: Double, median: Double, sd: Double, cv: Double, readings: Double),
         hbA1cDisplayUnit: HbA1cDisplayUnit,
         hbA1cDisplayUnit: HbA1cDisplayUnit,