SetTbrCommand: verify current menu when checking running TBR.

This commit is contained in:
Johannes Mockenhaupt 2017-12-13 14:22:01 +01:00
parent 3156efaaf6
commit 7ed64c5a7d
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -69,6 +69,7 @@ public class SetTbrCommand extends BaseCommand {
// and all). To avoid this, wait until the active TBR runs out if the active TBR
// is about to end
long timeout = System.currentTimeMillis() + 65 * 1000;
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
PumpState state = scripter.readPumpStateInternal();
if (state.tbrRemainingDuration == 1) {
while (state.tbrActive && System.currentTimeMillis() < timeout) {