slow pump fix

This commit is contained in:
Sandra Keßler 2017-07-30 18:01:01 +02:00
parent 1d3fee54e9
commit bfb6039c16
2 changed files with 11 additions and 11 deletions

View file

@ -58,7 +58,7 @@ public class BolusCommand implements Command {
Double bolusRemaining = (Double) scripter.currentMenu.getAttribute(MenuAttribute.BOLUS_REMAINING);
while (bolusRemaining != null) {
log.debug("Delivering bolus, remaining: " + bolusRemaining);
SystemClock.sleep(200);
SystemClock.sleep(300);
bolusRemaining = (Double) scripter.currentMenu.getAttribute(MenuAttribute.BOLUS_REMAINING);
}
@ -122,11 +122,11 @@ public class BolusCommand implements Command {
for (int i = 0; i < steps; i++) {
scripter.verifyMenuIsDisplayed(MenuType.BOLUS_ENTER);
scripter.pressUpKey();
SystemClock.sleep(100);
SystemClock.sleep(400);
}
// Give the pump time to finish any scrolling that might still be going on, can take
// up to 1100ms. Plus some extra time to be sure
SystemClock.sleep(2000);
SystemClock.sleep(750);
}
private void verifyDisplayedBolusAmount(RuffyScripter scripter) {
@ -138,7 +138,7 @@ public class BolusCommand implements Command {
}
// check again to ensure the displayed value hasn't change due to due scrolling taking extremely long
SystemClock.sleep(2000);
SystemClock.sleep(750);
double refreshedDisplayedBolus = readDisplayedBolusAmount(scripter);
if (Math.abs(displayedBolus - refreshedDisplayedBolus) > 0.05) {
throw new CommandException().message("Failed to set bolus: bolus changed after input stopped from "

View file

@ -121,12 +121,12 @@ public class SetTbrCommand implements Command {
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
if (increasePercentage) scripter.pressUpKey();
else scripter.pressDownKey();
SystemClock.sleep(100);
SystemClock.sleep(400);
log.debug("Push #" + (i + 1));
}
// Give the pump time to finish any scrolling that might still be going on, can take
// up to 1100ms. Plus some extra time to be sure
SystemClock.sleep(2000);
SystemClock.sleep(750);
}
private void verifyDisplayedTbrPercentage(RuffyScripter scripter) {
@ -138,7 +138,7 @@ public class SetTbrCommand implements Command {
}
// check again to ensure the displayed value hasn't change due to due scrolling taking extremely long
SystemClock.sleep(2000);
SystemClock.sleep(750);
long refreshedDisplayedTbrPecentage = readDisplayedTbrPercentage(scripter);
if (displayedPercentage != refreshedDisplayedTbrPecentage) {
throw new CommandException().message("Failed to set TBR percentage: " +
@ -186,12 +186,12 @@ public class SetTbrCommand implements Command {
scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION);
if (increaseDuration) scripter.pressUpKey();
else scripter.pressDownKey();
SystemClock.sleep(100);
SystemClock.sleep(400);
log.debug("Push #" + (i + 1));
}
// Give the pump time to finish any scrolling that might still be going on, can take
// up to 1100ms. Plus some extra time to be sure
SystemClock.sleep(2000);
SystemClock.sleep(750);
}
private void verifyDisplayedTbrDuration(RuffyScripter scripter) {
@ -203,7 +203,7 @@ public class SetTbrCommand implements Command {
}
// check again to ensure the displayed value hasn't change due to due scrolling taking extremely long
SystemClock.sleep(2000);
SystemClock.sleep(750);
long refreshedDisplayedTbrDuration = readDisplayedTbrDuration(scripter);
if (displayedDuration != refreshedDisplayedTbrDuration) {
throw new CommandException().message("Failed to set TBR duration: " +
@ -261,7 +261,7 @@ public class SetTbrCommand implements Command {
scripter.waitForMenuToBeLeft(MenuType.WARNING_OR_ERROR);
alertProcessed = true;
}
SystemClock.sleep(10);
SystemClock.sleep(20);
}
}