Jon Mårtensson 4 лет назад
Родитель
Сommit
1d1dbbba37
1 измененных файлов с 4 добавлено и 11 удалено
  1. 4 11
      FreeAPS/Resources/javascript/middleware/determine_basal.js

+ 4 - 11
FreeAPS/Resources/javascript/middleware/determine_basal.js

@@ -32,21 +32,14 @@ function middleware(iob, currenttemp, glucose, profile, autosens, meal, reservoi
         exerciseSetting = true;
     }
     
-    // Checks if the variable is defined, in case Auto-ISF is not installed.
-    if (typeof profile.use_autoisf  !== 'undefined') {
-        // Turns off Auto-ISF when using Dynamic ISF.
-        if (profile.use_autoisf == true && chrisFormula) == true) {
-            profile.use_autoisf = false;
-        }
+    // Turns off Auto-ISF when using Dynamic ISF.
+    if (profile.use_autoisf == true && chrisFormula == true) {
+        profile.use_autoisf = false;
     }
     
     // Turn off Chris' formula (and AutoISF) when using a temp target >= 118 (6.5 mol/l) and if an exercise setting is enabled.
-    // If using AutoISF uncomment the profile.use_autoisf = false
     if (currentMinTarget >= 118 && exerciseSetting == true) {
-        // Checks if the variable is defined, in case Auto-ISF is not installed.
-        if (typeof profile.use_autoisf  !== 'undefined') {
-            profile.use_autoisf = false;
-        }
+        profile.use_autoisf = false;
         chrisFormula = false;
         log = "Dynamic ISF temporarily off due to a high temp target/exercising. Current min target: " + currentMinTarget;
     }