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);
|
||||
long percentageChange = percentage - currentPercent;
|
||||
long percentageSteps = percentageChange / 10;
|
||||
boolean increasePercentage = true;
|
||||
if (percentageSteps < 0) {
|
||||
increasePercentage = false;
|
||||
percentageSteps = Math.abs(percentageSteps);
|
||||
}
|
||||
boolean increasePercentage = percentageSteps > 0;
|
||||
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);
|
||||
log.debug("Push #" + (i + 1));
|
||||
if (increasePercentage) scripter.pressUpKey();
|
||||
|
|
Loading…
Reference in a new issue