Skip to content

Commit

Permalink
review change
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Lobstein <[email protected]>
  • Loading branch information
mlobstein committed Dec 31, 2024
1 parent c5b7c97 commit 5af7bc6
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ public Switch getPowerStatus() throws BenqProjectorCommandException, BenqProject
}

public void setPower(Switch value) throws BenqProjectorCommandException, BenqProjectorException {
sendCommand(value == Switch.ON ? "pow=on" : "pow=off");

// some projectors need the off command twice to switch off
if (value == Switch.OFF) {
if (value == Switch.ON) {
sendCommand("pow=on");
} else {
// some projectors need the off command twice to switch off
sendCommand("pow=off");
sendCommand("pow=off");
}
}
Expand Down

0 comments on commit 5af7bc6

Please sign in to comment.