Make RuffyScripter.returnToRootMenu more robust.
This commit is contained in:
parent
a3fe804c3d
commit
28b80697f9
1 changed files with 4 additions and 2 deletions
|
@ -52,7 +52,7 @@ import de.jotomo.ruffyscripter.commands.SetTbrCommand;
|
||||||
public class RuffyScripter implements RuffyCommands {
|
public class RuffyScripter implements RuffyCommands {
|
||||||
private static final Logger log = LoggerFactory.getLogger(RuffyScripter.class);
|
private static final Logger log = LoggerFactory.getLogger(RuffyScripter.class);
|
||||||
|
|
||||||
public static final long DISCONNECT_TIME_OUT_MS = 2500;
|
private static final long DISCONNECT_TIME_OUT_MS = 2500;
|
||||||
|
|
||||||
private IRuffyService ruffyService;
|
private IRuffyService ruffyService;
|
||||||
|
|
||||||
|
@ -226,7 +226,9 @@ public class RuffyScripter implements RuffyCommands {
|
||||||
while (menuType != MenuType.MAIN_MENU && menuType != MenuType.STOP && menuType != MenuType.WARNING_OR_ERROR) {
|
while (menuType != MenuType.MAIN_MENU && menuType != MenuType.STOP && menuType != MenuType.WARNING_OR_ERROR) {
|
||||||
log.debug("Going back to main menu, currently at " + menuType);
|
log.debug("Going back to main menu, currently at " + menuType);
|
||||||
pressBackKey();
|
pressBackKey();
|
||||||
waitForScreenUpdate();
|
while(getCurrentMenu().getType() == menuType) {
|
||||||
|
waitForScreenUpdate();
|
||||||
|
}
|
||||||
menuType = getCurrentMenu().getType();
|
menuType = getCurrentMenu().getType();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue