RuffyScripter.isConnected: longer wait.
Declare the connection dead if no menu update was sent within 10s. Occassionally it takes up 4s for regular updates to come in (possibly due to other busy background threads? Iob/Cob calc is suspiscously often running when the error occurs). With the previous timeout, commands were killed too early when things (pump, ruffy, aaps ...) needed some time to think).
This commit is contained in:
parent
2d769ccf9a
commit
9457fb61e5
1 changed files with 1 additions and 4 deletions
|
@ -187,10 +187,7 @@ public class RuffyScripter implements RuffyCommands {
|
|||
if (!ruffyService.isConnected()) {
|
||||
return false;
|
||||
}
|
||||
if (System.currentTimeMillis() - menuLastUpdated >= 1500) {
|
||||
waitForScreenUpdate();
|
||||
}
|
||||
return System.currentTimeMillis() - menuLastUpdated < 1500;
|
||||
return ruffyService.isConnected() && System.currentTimeMillis() - menuLastUpdated < 10 * 1000;
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue