Explorar o código

Rename variable in prepare/determine_basal.js, removed commented out code

Deniz Cengiz hai 11 meses
pai
achega
ccdeddd663

+ 0 - 8
Model/Helper/GlucoseStored+helper.swift

@@ -20,14 +20,6 @@ extension GlucoseStored {
         return request
     }
 
-//    static func glucoseIsFlat(_ glucose: [GlucoseStored]) -> Bool {
-//        guard glucose.count >= 6 else { return false }
-//
-//        let firstValue = glucose.first?.glucose
-//
-//        return glucose.allSatisfy { $0.glucose == firstValue }
-//    }
-
     static func glucoseIsHIGH(_ glucose: [GlucoseStored]) -> Bool {
         guard glucose.count >= 4 else { return false }
 

+ 3 - 3
Trio/Resources/javascript/prepare/determine-basal.js

@@ -40,10 +40,10 @@ function generate(iob, currenttemp, glucose, profile, autosens = null, meal = nu
         basalprofile = basalProfile;
     }
     
-    var copied_trio_custom_oref_variables = {};
+    var trio_custom_oref_variables_temp = {};
     if (trio_custom_oref_variables) {
-        copied_trio_custom_oref_variables = trio_custom_oref_variables;
+        trio_custom_oref_variables_temp = trio_custom_oref_variables;
     }
     
-    return freeaps_determineBasal(glucose_status, currenttemp, iob, profile, autosens_data, meal_data, freeaps_basalSetTemp, microbolusAllowed, reservoir_data, clock, pumphistory, preferences, basalprofile, copied_trio_custom_oref_variables, middleware_was_used);
+    return freeaps_determineBasal(glucose_status, currenttemp, iob, profile, autosens_data, meal_data, freeaps_basalSetTemp, microbolusAllowed, reservoir_data, clock, pumphistory, preferences, basalprofile, trio_custom_oref_variables_temp, middleware_was_used);
 }

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

@@ -440,12 +440,6 @@ final class BaseAPSManager: APSManager, Injectable {
                 return false
             }
 
-//            guard !GlucoseStored.glucoseIsFlat(glucose) else {
-//                debug(.apsManager, "Glucose data is too flat")
-//                self.processError(APSError.glucoseError(message: String(localized: "Glucose data is too flat")))
-//                return false
-//            }
-
             return true
         }
 

+ 2 - 1
oref0_source_version.txt

@@ -1,6 +1,7 @@
-oref0 branch: fix-400-guard - git version: 1591b14
+oref0 branch: dev - git version: c0b46d3
 
 Last commits:
+c0b46d3 Merge pull request #47 from nightscout/fix-400-guard
 1591b14 Remove leftover != 400 condition
 4204b12 Remove autoISF adjustments from glucose-get-last
 2596f3f Refactor 400 glucose guard: - Remove old 400 guard - Replace with check that only disables SMBs and keeps TBR at neutral == current basal rate, if shouldProtectDueToHIGH is not null/undefined and true - Remove all other 400 guards