Add temporary fix for edge case resulting in SetTbrCommand failing to set TBR_DURATION, where duration is not correctly pumped up to a multiple of 15.
(cherry picked from commit df9952f)
This commit is contained in:
parent
a53564fcae
commit
cff4bc1abe
|
@ -180,8 +180,12 @@ public class SetTbrCommand extends BaseCommand {
|
||||||
// Pressing up from 23:59 works to go to 24:00.
|
// Pressing up from 23:59 works to go to 24:00.
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION);
|
scripter.verifyMenuIsDisplayed(MenuType.TBR_DURATION);
|
||||||
scripter.pressUpKey();
|
scripter.pressUpKey();
|
||||||
scripter.waitForMenuUpdate();
|
// TODO optimization: replace with logic that calculates the amount of
|
||||||
currentDuration = scripter.readDisplayedDuration();
|
// steps including this one and issues them in one go, with a final wait
|
||||||
|
do {
|
||||||
|
currentDuration = scripter.readDisplayedDuration();
|
||||||
|
scripter.waitForMenuUpdate();
|
||||||
|
} while (currentDuration % 15 != 0);
|
||||||
}
|
}
|
||||||
log.debug("Current TBR duration: " + currentDuration);
|
log.debug("Current TBR duration: " + currentDuration);
|
||||||
long durationChange = duration - currentDuration;
|
long durationChange = duration - currentDuration;
|
||||||
|
|
Loading…
Reference in a new issue