From a1e43998f428b325512d67a0c7b0d2359404653e Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Thu, 28 Feb 2019 17:48:14 +0100 Subject: [PATCH] doc: languages and terminology --- pybricks/_display.py | 4 ++-- pybricks/ev3brick.py | 2 +- pybricks/ev3devices.py | 8 ++++---- pybricks/parameters.py | 4 ++-- pybricks/robotics.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pybricks/_display.py b/pybricks/_display.py index 59f92f3..85ce2da 100644 --- a/pybricks/_display.py +++ b/pybricks/_display.py @@ -54,13 +54,13 @@ class Display(): Example:: - # Show a built-in image showing two eyes looking upward + # Show a built-in image of two eyes looking upward brick.display.image(ImageFile.UP) # Display a custom image from your project folder brick.display.image('pybricks.png') - # Display a custom image image at the top right of the screen, without clearing + # Display a custom image at the top right of the screen, without clearing # the screen first brick.display.image('arrow.png', Align.TOP_RIGHT, clear=False) """ diff --git a/pybricks/ev3brick.py b/pybricks/ev3brick.py index dfc4c8c..12fbb89 100644 --- a/pybricks/ev3brick.py +++ b/pybricks/ev3brick.py @@ -18,7 +18,7 @@ def buttons(): :: - # Wait until any of the buttons is pressed + # Wait until any of the buttons are pressed while not any(brick.buttons()): wait(10) diff --git a/pybricks/ev3devices.py b/pybricks/ev3devices.py index d2fef45..8e6a9b5 100644 --- a/pybricks/ev3devices.py +++ b/pybricks/ev3devices.py @@ -81,7 +81,7 @@ class Motor(): def stalled(self): """Check whether the motor is currently stalled. - A motor is stalled when it cannot move even with the maximum torque. For example, it cannot move because something is blocking the motor or your mechanism simply cannot turn any further. + A motor is stalled when it cannot move even with the maximum torque. For example, when something is blocking the motor or your mechanism simply cannot turn any further. Specifically, the motor is stalled when the duty cycle computed by the PID controllers has reached the maximum (so ``duty`` = ``duty_limit``) and still the motor cannot reach a minimal speed (so ``speed`` < ``stall_speed``) for a period of at least ``stall_time``. @@ -187,7 +187,7 @@ class Motor(): This function is quite similar to :meth:`.run_target`, but speed and acceleration settings are ignored: it will move to the target angle as fast as possible. Instead, you adjust speed and acceleration by choosing how fast or slow you vary the ``target_angle``. - This method is useful in fast loops where the motor target changes continously. + This method is useful in fast loops where the motor target changes continuously. Arguments: target_angle (:ref:`angle`): Target angle that the motor should rotate to. @@ -216,7 +216,7 @@ class Motor(): pass def set_dc_settings(self, duty_limit, duty_offset): - """Configure the settings to adjust the behavior of the :meth:`.dc` command. This also affects the all of the ``run`` commands, which use the :meth:`.dc` in the background. + """Configure the settings to adjust the behavior of the :meth:`.dc` command. This also affects all of the ``run`` commands, which use the :meth:`.dc` method in the background. Arguments: duty_limit (:ref:`percentage`): Relative torque limit during subsequent motor commands. This sets the maximum duty cycle that is applied during any subsequent motor command. This reduces the maximum torque output to a percentage of the absolute maximum stall torque. This is useful to avoid applying the full motor torque to a geared or lever mechanism, or to prevent your LEGO\ :sup:`®` train from unintentionally going at full speed. (*Default*: 100). @@ -235,7 +235,7 @@ class Motor(): Example:: - # Set the maximum speed to 200 deg/s and set the acceleration to 400 deg/s/s. + # Set the maximum speed to 200 deg/s and acceleration to 400 deg/s/s. example_motor.set_run_settings(200, 400) # Make the motor run for 5 seconds. Even though the speed argument is 300 diff --git a/pybricks/parameters.py b/pybricks/parameters.py index 5653d1c..d480e57 100644 --- a/pybricks/parameters.py +++ b/pybricks/parameters.py @@ -74,7 +74,7 @@ class Stop(Enum): Keep controlling the motor to hold it at the commanded angle. This is only available on motors with encoders. - The stop type defines the resistance to motion after coming to standstill: + The stop type defines the resistance to motion after coming to a standstill: +-----------+-------------+------------------------------------------+ |Parameter | Resistance | Physical meaning | @@ -135,7 +135,7 @@ class Direction(): \______________/ - Large EV3 motor: + Large EV3 Motor: ________ / \ ___ ___ diff --git a/pybricks/robotics.py b/pybricks/robotics.py index a508606..8bdd56c 100644 --- a/pybricks/robotics.py +++ b/pybricks/robotics.py @@ -4,7 +4,7 @@ from parameters import Stop, Direction class DriveBase(): - """Class respresenting a robotic vehicle with two powered wheels and optional wheel caster(s).""" + """Class representing a robotic vehicle with two powered wheels and optional wheel caster(s).""" def __init__(self, left_motor, right_motor, wheel_diameter, axle_track): """DriveBase(left_motor, right_motor, wheel_diameter, axle_track)