Kaynağa Gözat

More logging

Jon Mårtensson 4 yıl önce
ebeveyn
işleme
69c644dd9c

+ 3 - 3
FreeAPS/Resources/javascript/middleware/determine_basal.js

@@ -261,12 +261,12 @@ function middleware(iob, currenttemp, glucose, profile, autosens, meal, reservoi
 
         // Respect autosens.max and autosens.min limits
         if (newRatio > maxLimitChris) {
+            log = "Dynamic ISF hit limit by autosens_max setting: " + maxLimitChris + " (" +  newRatio.toPrecision(3) + ")" + ". ISF: " + (profile.sens / maxLimitChris).toPrecision(3) + " (" + ((profile.sens / maxLimitChris) * 0.0555).toPrecision(3) + " mmol/l/U)";
             newRatio = maxLimitChris;
-            log = "Dynamic ISF hit limit by autosens_max setting: " + maxLimitChris + ". ISF: " + (profile.sens / maxLimitChris).toPrecision(3) + " (" + ((profile.sens / maxLimitChris) * 0.0555).toPrecision(3) + " mmol/l/U)";
         } else if (newRatio < minLimitChris) {
+            log = "Dynamic ISF hit limit by autosens_min setting: " + minLimitChris + " (" +  newRatio.toPrecision(3) + ")" + ". ISF: " + (profile.sens / minLimitChris).toPrecision(3) + " (" + ((profile.sens / minLimitChris) * 0.0555).toPrecision(3) + " mmol/l/U)";
             newRatio = minLimitChris;
-            log = "Dynamic ISF hit limit by autosens_min setting: " + minLimitChris + ". ISF: " + (profile.sens / minLimitChris).toPrecision(3) + " (" + ((profile.sens / minLimitChris) * 0.0555).toPrecision(3) + " mmol/l/U)";
-          }
+        }
 
         // Set the new ratio
         autosens.ratio = newRatio;