Skip to content

Commit

Permalink
doc: fix and clarify verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensvalk committed Mar 24, 2020
1 parent 166ce21 commit 0bee7ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions pybricks/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def dc(self, duty):
pass

def stop(self):
"""Stops the motor and let it spin freely.
"""Stops the motor and lets it spin freely.
The motor gradually stops due to friction."""
pass
Expand Down Expand Up @@ -204,9 +204,10 @@ def hold(self):
pass

def run(self, speed):
"""Keeps the motor running at a constant speed.
"""Runs the motor at a constant speed.
The motor keeps running until you give a new command.
The motor accelerates to the given speed and keeps running at this
speed until you give a new command.
Arguments:
speed (:ref:`speed`): Speed of the motor.
Expand All @@ -216,6 +217,10 @@ def run(self, speed):
def run_time(self, speed, time, then=Stop.HOLD, wait=True):
"""Runs the motor at a constant speed for a given amount of time.
The motor accelerates to the given speed, keeps running at this speed,
and then decelerates. The total maneuver lasts for exactly the given
amount of ``time``.
Arguments:
speed (:ref:`speed`): Speed of the motor.
time (:ref:`time`): Duration of the maneuver.
Expand Down
6 changes: 3 additions & 3 deletions pybricks/pupdevices.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def rgb(self):
pass

def distance(self):
"""Measures the relative distance between the sensor and an object using
infrared light.
"""Measures the relative distance between the sensor and an object
using infrared light.
Returns:
:ref:`relativedistance`: Relative distance ranging from 0 (closest)
Expand All @@ -102,7 +102,7 @@ def distance(self):
pass

def remote(self, channel, button_1=None, button_2=None):
"""Make the sensor act like a Power Functions 1.0 IR remote.
"""Makes the sensor act like a Power Functions 1.0 IR remote.
Choose a channel and up to two buttons to "press". The infrared
receiver behaves just as if responding to the real remote.
Expand Down

0 comments on commit 0bee7ef

Please sign in to comment.