slow pump fix
This commit is contained in:
parent
1d3fee54e9
commit
bfb6039c16
2 changed files with 11 additions and 11 deletions
|
@ -58,7 +58,7 @@ public class BolusCommand implements Command {
|
||||||
Double bolusRemaining = (Double) scripter.currentMenu.getAttribute(MenuAttribute.BOLUS_REMAINING);
|
Double bolusRemaining = (Double) scripter.currentMenu.getAttribute(MenuAttribute.BOLUS_REMAINING);
|
||||||
while (bolusRemaining != null) {
|
while (bolusRemaining != null) {
|
||||||
log.debug("Delivering bolus, remaining: " + bolusRemaining);
|
log.debug("Delivering bolus, remaining: " + bolusRemaining);
|
||||||
SystemClock.sleep(200);
|
SystemClock.sleep(300);
|
||||||
bolusRemaining = (Double) scripter.currentMenu.getAttribute(MenuAttribute.BOLUS_REMAINING);
|
bolusRemaining = (Double) scripter.currentMenu.getAttribute(MenuAttribute.BOLUS_REMAINING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,11 +122,11 @@ public class BolusCommand implements Command {
|
||||||
for (int i = 0; i < steps; i++) {
|
for (int i = 0; i < steps; i++) {
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.BOLUS_ENTER);
|
scripter.verifyMenuIsDisplayed(MenuType.BOLUS_ENTER);
|
||||||
scripter.pressUpKey();
|
scripter.pressUpKey();
|
||||||
SystemClock.sleep(100);
|
SystemClock.sleep(400);
|
||||||
}
|
}
|
||||||
// Give the pump time to finish any scrolling that might still be going on, can take
|
// 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
|
// up to 1100ms. Plus some extra time to be sure
|
||||||
SystemClock.sleep(2000);
|
SystemClock.sleep(750);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyDisplayedBolusAmount(RuffyScripter scripter) {
|
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
|
// 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);
|
double refreshedDisplayedBolus = readDisplayedBolusAmount(scripter);
|
||||||
if (Math.abs(displayedBolus - refreshedDisplayedBolus) > 0.05) {
|
if (Math.abs(displayedBolus - refreshedDisplayedBolus) > 0.05) {
|
||||||
throw new CommandException().message("Failed to set bolus: bolus changed after input stopped from "
|
throw new CommandException().message("Failed to set bolus: bolus changed after input stopped from "
|
||||||
|
|
|
@ -121,12 +121,12 @@ public class SetTbrCommand implements Command {
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
||||||
if (increasePercentage) scripter.pressUpKey();
|
if (increasePercentage) scripter.pressUpKey();
|
||||||
else scripter.pressDownKey();
|
else scripter.pressDownKey();
|
||||||
SystemClock.sleep(100);
|
SystemClock.sleep(400);
|
||||||
log.debug("Push #" + (i + 1));
|
log.debug("Push #" + (i + 1));
|
||||||
}
|
}
|
||||||
// Give the pump time to finish any scrolling that might still be going on, can take
|
// 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
|
// up to 1100ms. Plus some extra time to be sure
|
||||||
SystemClock.sleep(2000);
|
SystemClock.sleep(750);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyDisplayedTbrPercentage(RuffyScripter scripter) {
|
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
|
// 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);
|
long refreshedDisplayedTbrPecentage = readDisplayedTbrPercentage(scripter);
|
||||||
if (displayedPercentage != refreshedDisplayedTbrPecentage) {
|
if (displayedPercentage != refreshedDisplayedTbrPecentage) {
|
||||||
throw new CommandException().message("Failed to set TBR percentage: " +
|
throw new CommandException().message("Failed to set TBR percentage: " +
|
||||||
|
@ -186,12 +186,12 @@ public class SetTbrCommand implements Command {
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION);
|
scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION);
|
||||||
if (increaseDuration) scripter.pressUpKey();
|
if (increaseDuration) scripter.pressUpKey();
|
||||||
else scripter.pressDownKey();
|
else scripter.pressDownKey();
|
||||||
SystemClock.sleep(100);
|
SystemClock.sleep(400);
|
||||||
log.debug("Push #" + (i + 1));
|
log.debug("Push #" + (i + 1));
|
||||||
}
|
}
|
||||||
// Give the pump time to finish any scrolling that might still be going on, can take
|
// 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
|
// up to 1100ms. Plus some extra time to be sure
|
||||||
SystemClock.sleep(2000);
|
SystemClock.sleep(750);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyDisplayedTbrDuration(RuffyScripter scripter) {
|
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
|
// 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);
|
long refreshedDisplayedTbrDuration = readDisplayedTbrDuration(scripter);
|
||||||
if (displayedDuration != refreshedDisplayedTbrDuration) {
|
if (displayedDuration != refreshedDisplayedTbrDuration) {
|
||||||
throw new CommandException().message("Failed to set TBR duration: " +
|
throw new CommandException().message("Failed to set TBR duration: " +
|
||||||
|
@ -261,7 +261,7 @@ public class SetTbrCommand implements Command {
|
||||||
scripter.waitForMenuToBeLeft(MenuType.WARNING_OR_ERROR);
|
scripter.waitForMenuToBeLeft(MenuType.WARNING_OR_ERROR);
|
||||||
alertProcessed = true;
|
alertProcessed = true;
|
||||||
}
|
}
|
||||||
SystemClock.sleep(10);
|
SystemClock.sleep(20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue