From 3497296b6c39eef546322ef93a84df03acab0c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandra=20Ke=C3=9Fler?= Date: Mon, 31 Jul 2017 09:08:12 +0200 Subject: [PATCH] more time --- app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 4 ++-- .../java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index 69ad56178e..df32847b59 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -336,7 +336,7 @@ public class RuffyScripter { // if the user just pressed a button on the combo, the screen needs to time first // before a connection is possible. In that case, it takes 45s before the // connection comes up. - waitForMenuUpdate(90); + waitForMenuUpdate(180); } catch (RemoteException e) { throw new CommandException().exception(e).message("Unexpected exception while initiating/restoring pump connection"); } @@ -387,7 +387,7 @@ public class RuffyScripter { * Wait until the menu update is in */ public void waitForMenuUpdate() { - waitForMenuUpdate(60); + waitForMenuUpdate(120); } public void waitForMenuUpdate(long timeoutInSeconds) { diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java index be072e3f20..5815425e51 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java @@ -171,9 +171,12 @@ public class SetTbrCommand implements Command { // Pressing up from 23:59 works to go to 24:00. scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION); scripter.pressUpKey(); + SystemClock.sleep(300); scripter.waitForMenuUpdate(); currentDuration = readDisplayedTbrDuration(scripter); } + SystemClock.sleep(300); + currentDuration = readDisplayedTbrDuration(scripter); log.debug("Current TBR duration: " + currentDuration); long durationChange = duration - currentDuration; long durationSteps = durationChange / 15;