Simplify reading alerts (message doesn't blink)
This commit is contained in:
parent
e01e85c54f
commit
4ff81e885c
1 changed files with 2 additions and 7 deletions
|
@ -347,16 +347,11 @@ public class RuffyScripter {
|
|||
|
||||
public PumpAlert readDisplayPumpAlert() {
|
||||
Object errorObj = currentMenu.getAttribute(MenuAttribute.ERROR);
|
||||
Object errorMsgObj = currentMenu.getAttribute(MenuAttribute.MESSAGE);
|
||||
while (errorObj == null) {
|
||||
SystemClock.sleep(10);
|
||||
errorObj = currentMenu.getAttribute(MenuAttribute.ERROR);
|
||||
errorMsgObj = currentMenu.getAttribute(MenuAttribute.MESSAGE);
|
||||
}
|
||||
while (errorMsgObj == null) {
|
||||
SystemClock.sleep(10);
|
||||
errorMsgObj = currentMenu.getAttribute(MenuAttribute.MESSAGE);
|
||||
}
|
||||
return new PumpAlert((int) errorObj, (String) errorMsgObj);
|
||||
String errorMsg = (String) currentMenu.getAttribute(MenuAttribute.MESSAGE);
|
||||
return new PumpAlert((int) errorObj, errorMsg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue