Ver código fonte

fix timestamp of suggestion

Ivan Valkou 5 anos atrás
pai
commit
11c5410b4a

+ 1 - 1
FreeAPS/Sources/APS/OpenAPS/OpenAPS.swift

@@ -67,7 +67,7 @@ final class OpenAPS {
                 debug(.openAPS, "SUGGESTED: \(suggested)")
 
                 if var suggestion = Suggestion(from: suggested) {
-                    suggestion.timestamp = suggestion.deliverAt
+                    suggestion.timestamp = suggestion.deliverAt ?? clock
                     try? self.storage.save(suggestion, as: Enact.suggested)
                     promise(.success(suggestion))
                 } else {

+ 1 - 1
FreeAPS/Sources/Services/Network/NightscoutAPI.swift

@@ -13,7 +13,7 @@ class NightscoutAPI {
         static let treatmentsPath = "/api/v1/treatments.json"
         static let statusPath = "/api/v1/devicestatus.json"
         static let retryCount = 1
-        static let timeout: TimeInterval = 30
+        static let timeout: TimeInterval = 60
     }
 
     enum Error: LocalizedError {