Просмотр исходного кода

Add handling of pump suspension

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

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

@@ -186,8 +186,8 @@ function middleware(iob, currenttemp, glucose, profile, autosens, meal, reservoi
             do {
                 --o;
                 if (o >= 0) {
-                    if (pumphistory[o]._type == "TempBasal") {
-                        // time of next (new) temp basal
+                    if (pumphistory[o]._type == "TempBasal" || pumphistory[o]._type == "PumpSuspend") {
+                        // time of next (new) temp basal or a pump suspension
                         newTime = new Date(pumphistory[o].timestamp);
                         break;
                     }