mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-14 18:47:32 +00:00
doc/parameters/Direction: move doc to rst
This commit is contained in:
@@ -1,8 +1,23 @@
|
||||
Direction
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: pybricks.parameters.Direction
|
||||
:no-members:
|
||||
.. class:: Direction
|
||||
|
||||
Rotational direction for positive speed or angle values.
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Direction.CLOCKWISE
|
||||
:annotation:
|
||||
|
||||
.. autoattribute:: pybricks.parameters.Direction.COUNTERCLOCKWISE
|
||||
:annotation:
|
||||
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
| ``positive_direction =`` | Positive speed: | Negative speed: |
|
||||
+================================+===================+=================+
|
||||
| ``Direction.CLOCKWISE`` | clockwise | counterclockwise|
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
| ``Direction.COUNTERCLOCKWISE`` | counterclockwise | clockwise |
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
|
||||
In general, clockwise is defined by **looking at the motor shaft, just
|
||||
like looking at a clock**. Some motors have two shafts. If in doubt,
|
||||
|
||||
+4
-18
@@ -111,27 +111,13 @@ class Stop(_PybricksEnum):
|
||||
|
||||
|
||||
class Direction(_PybricksEnum):
|
||||
"""Rotational direction for positive speed or angle values.
|
||||
|
||||
.. data:: CLOCKWISE
|
||||
|
||||
A positive speed value should make the motor move clockwise.
|
||||
|
||||
.. data:: COUNTERCLOCKWISE
|
||||
|
||||
A positive speed value should make the motor move counterclockwise.
|
||||
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
| ``positive_direction =`` | Positive speed: | Negative speed: |
|
||||
+================================+===================+=================+
|
||||
| ``Direction.CLOCKWISE`` | clockwise | counterclockwise|
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
| ``Direction.COUNTERCLOCKWISE`` | counterclockwise | clockwise |
|
||||
+--------------------------------+-------------------+-----------------+
|
||||
"""
|
||||
"""Rotational direction for positive speed or angle values."""
|
||||
|
||||
CLOCKWISE = 0
|
||||
"""A positive speed value should make the motor move clockwise."""
|
||||
|
||||
COUNTERCLOCKWISE = 1
|
||||
"""A positive speed value should make the motor move counterclockwise."""
|
||||
|
||||
|
||||
class Button(_PybricksEnum):
|
||||
|
||||
Reference in New Issue
Block a user