Преглед изворни кода

Add handling of pump suspension

Jon Mårtensson пре 4 година
родитељ
комит
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;
                     }