Skip to content

Commit

Permalink
Inclusive bounds checks shouldn't trigger on equals
Browse files Browse the repository at this point in the history
  • Loading branch information
skorokithakis authored Nov 22, 2017
1 parent 3d70e2a commit 222d94c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def manual_control_once(
def manual_control(self, rotation: int, velocity: float,
duration: int=1500):
"""Give a command over manual control interface."""
if rotation <= -180 or rotation >= 180:
if rotation < -180 or rotation > 180:
raise DeviceException("Given rotation is invalid, should "
"be ]-180, 180[, was %s" % rotation)
if velocity <= -0.3 or velocity >= 0.3:
if velocity < -0.3 or velocity > 0.3:
raise DeviceException("Given velocity is invalid, should "
"be ]-0.3, 0.3[, was: %s" % velocity)

Expand Down

0 comments on commit 222d94c

Please sign in to comment.