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:
Johannes Mockenhaupt 2017-08-28 12:24:01 +02:00
parent a53564fcae
commit cff4bc1abe
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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;