Skip to content

Commit

Permalink
Fixed #90
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsv committed Jul 3, 2018
1 parent e0d013f commit 2a59722
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions l293d/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def drive_motor(self, direction=1, duration=None, wait=True, speed=100):
"""
self.check()

if not speed:
speed = 0
if isinstance(speed, int):
# If speed is an integer, change it to a tuple
speed = (speed, speed)
Expand Down

0 comments on commit 2a59722

Please sign in to comment.