Cleanup.
(cherry picked from commit e7fe202)
This commit is contained in:
parent
17dd6df527
commit
4aac46f2bc
|
@ -110,13 +110,9 @@ public class SetTbrCommand extends BaseCommand {
|
||||||
log.debug("Current TBR %: " + currentPercent);
|
log.debug("Current TBR %: " + currentPercent);
|
||||||
long percentageChange = percentage - currentPercent;
|
long percentageChange = percentage - currentPercent;
|
||||||
long percentageSteps = percentageChange / 10;
|
long percentageSteps = percentageChange / 10;
|
||||||
boolean increasePercentage = true;
|
boolean increasePercentage = percentageSteps > 0;
|
||||||
if (percentageSteps < 0) {
|
|
||||||
increasePercentage = false;
|
|
||||||
percentageSteps = Math.abs(percentageSteps);
|
|
||||||
}
|
|
||||||
log.debug("Pressing " + (increasePercentage ? "up" : "down") + " " + percentageSteps + " times");
|
log.debug("Pressing " + (increasePercentage ? "up" : "down") + " " + percentageSteps + " times");
|
||||||
for (int i = 0; i < percentageSteps; i++) {
|
for (int i = 0; i < Math.abs(percentageSteps); i++) {
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
||||||
log.debug("Push #" + (i + 1));
|
log.debug("Push #" + (i + 1));
|
||||||
if (increasePercentage) scripter.pressUpKey();
|
if (increasePercentage) scripter.pressUpKey();
|
||||||
|
|
Loading…
Reference in a new issue