Skip to content

Commit

Permalink
Fix manual_control error message typo (#127)
Browse files Browse the repository at this point in the history
* Fix manual_control error message typo

* Inclusive bounds checks shouldn't trigger on equals
  • Loading branch information
skorokithakis authored and rytilahti committed Nov 22, 2017
1 parent 68a4cf2 commit 3bed026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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 ]-3.1,3.1[, was %s" % rotation)
if velocity <= -0.3 or velocity >= 0.3:
"be ]-180, 180[, was %s" % rotation)
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 3bed026

Please sign in to comment.