Check active menu again when retrying inputs.
This commit is contained in:
parent
abf9566476
commit
3b287df77d
2 changed files with 4 additions and 0 deletions
|
@ -100,6 +100,7 @@ public class BolusCommand implements Command {
|
|||
}
|
||||
|
||||
private void inputBolusAmount(RuffyScripter scripter) {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.BOLUS_ENTER);
|
||||
// press 'up' once for each 0.1 U increment
|
||||
long steps = Math.round(bolus * 10);
|
||||
for (int i = 0; i < steps; i++) {
|
||||
|
@ -110,6 +111,7 @@ public class BolusCommand implements Command {
|
|||
}
|
||||
|
||||
private void verifyDisplayedBolusAmount(RuffyScripter scripter) {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.BOLUS_ENTER);
|
||||
double displayedBolus = readDisplayedBolusAmount(scripter);
|
||||
log.debug("Final bolus: " + displayedBolus);
|
||||
if (Math.abs(displayedBolus - bolus) > 0.05) {
|
||||
|
|
|
@ -157,6 +157,7 @@ public class SetTbrCommand implements Command {
|
|||
}
|
||||
|
||||
private void verifyDisplayedTbrPercentage(RuffyScripter scripter) {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
||||
long displayedPercentage = readDisplayedTbrPercentage(scripter);
|
||||
if (displayedPercentage != this.percentage) {
|
||||
log.debug("Final displayed TBR percentage: " + displayedPercentage);
|
||||
|
@ -176,6 +177,7 @@ public class SetTbrCommand implements Command {
|
|||
}
|
||||
|
||||
private void inputTbrDuration(RuffyScripter scripter) {
|
||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION);
|
||||
long currentDuration = readDisplayedTbrDuration(scripter);
|
||||
if (currentDuration % 15 != 0) {
|
||||
// The duration displayed is how long an active TBR will still run,
|
||||
|
|
Loading…
Reference in a new issue