RuffyScripter.confirmAlert: wait till alarm isn't displayed anymore.

(cherry picked from commit 2af7df3)
This commit is contained in:
Johannes Mockenhaupt 2017-11-26 12:51:58 +01:00
parent ffb5ee3b22
commit 47718723fe
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -844,6 +844,13 @@ public class RuffyScripter implements RuffyCommands {
if (getCurrentMenu().getType() == MenuType.WARNING_OR_ERROR) {
pressCheckKey();
}
// wait till the pump has processed the alarm, otherwise it might still be showing
// when a command returns
WarningOrErrorCode displayedWarning = readWarningOrErrorCode();
while (displayedWarning.warningCode != null && displayedWarning.warningCode.equals(warningCode)) {
waitForScreenUpdate();
displayedWarning = readWarningOrErrorCode();
}
return true;
}
SystemClock.sleep(10);