doc/parameters/Stop: move doc to rst

This commit is contained in:
Laurens Valk
2021-02-14 19:00:52 +01:00
parent fc04059d86
commit 5eb7a143fa
2 changed files with 19 additions and 17 deletions
+12 -2
View File
@@ -1,8 +1,18 @@
Stop
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: pybricks.parameters.Stop
:no-members:
.. class:: Stop
Action after the motor stops.
.. autoattribute:: pybricks.parameters.Stop.COAST
:annotation:
.. autoattribute:: pybricks.parameters.Stop.BRAKE
:annotation:
.. autoattribute:: pybricks.parameters.Stop.HOLD
:annotation:
The following table shows how each stop type adds an extra level of
resistance to motion. In these examples, ``m`` is a
+7 -15
View File
@@ -89,25 +89,17 @@ class Port(_PybricksEnum):
class Stop(_PybricksEnum):
"""Action after the motor stops: coast, brake, or hold.
.. data:: COAST
Let the motor move freely.
.. data:: BRAKE
Passively resist small external forces.
.. data:: HOLD
Keep controlling the motor to hold it at the commanded angle. This is
only available on motors with encoders.
"""
"""Action after the motor stops."""
COAST = 0
"""Let the motor move freely."""
BRAKE = 1
"""Passively resist small external forces."""
HOLD = 2
"""Keep controlling the motor to hold it at the commanded angle. This is
only available on motors with encoders."""
class Direction(_PybricksEnum):