Skip to content
Snippets Groups Projects
Commit 8e91fc68 authored by Samuel Tardieu's avatar Samuel Tardieu
Browse files

Fix doc string for set_{left,right}_motor_speed

parent b0d65d7a
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class Controller:
(between 1 and 100)."""
return self._read(self.MAX_MOTOR_PERCENTAGE, 1, "B")[0]
def set_motor_speed(self, left: Optional[int], right: Optional[int]):
def set_motor_speed(self, left: Optional[float], right: Optional[float]):
"""Set the motor speed between -100 and 100. None means not to
change the motor value. Using None for both motors will put
the controller board in standby mode and motors will stop."""
......@@ -73,11 +73,11 @@ class Controller:
return self._read(self.MOTOR_SPEED, 2, "bb")
def set_left_motor_speed(self, speed: int):
"""Set the left motor speed between -127 and 127."""
"""Set the left motor speed between -100 and 100."""
self.set_motor_speed(speed, None)
def set_right_motor_speed(self, speed: int):
"""Set the right motor speed between -127 and 127."""
"""Set the right motor speed between -100 and 100."""
self.set_motor_speed(None, speed)
def standby(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment