From bd0a2981681c56b3edf00521786dfa50884cfe35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandra=20Ke=C3=9Fler?= Date: Sun, 6 Aug 2017 18:18:13 +0200 Subject: [PATCH] fix maybe long duration before setting tbr --- .../ruffyscripter/commands/SetTbrCommand.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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 f610e691cf..38eab80161 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java @@ -252,9 +252,24 @@ public class SetTbrCommand implements Command { } } else { - Log.v("SetTbrCommand:tick",state+": setting and going to SET"); + Log.v("SetTbrCommand:tick",state+": setting"); scripter.pressCheckKey(); - updateState(SET, 30); + scripter.waitScreen(300); + if(scripter.currentMenu.getType()==MenuType.MAIN_MENU || scripter.currentMenu.getType()!=MenuType.WARNING_OR_ERROR) + { + Log.v("SetTbrCommand:tick",state+": set and going to SET"); + updateState(SET, 30); + } + else if(retries>0) + { + Log.v("SetTbrCommand:tick",state+": not set, wait"); + retries--; + } + else + { + Log.v("SetTbrCommand:tick",state+": no retry left"); + updateState(ERROR,30); + } } } }