From 4ff81e885cde5033e676d50a215d54671d3c5b58 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sat, 15 Jul 2017 16:14:38 +0200 Subject: [PATCH] Simplify reading alerts (message doesn't blink) --- .../main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index 69aa33bc44..7fb389d8b9 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -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); } }