diff --git a/doc/api/parameters/stop.rst b/doc/api/parameters/stop.rst index b9a77ae..254563f 100644 --- a/doc/api/parameters/stop.rst +++ b/doc/api/parameters/stop.rst @@ -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 diff --git a/pybricks/parameters.py b/pybricks/parameters.py index 5d1ea3d..5f5e035 100644 --- a/pybricks/parameters.py +++ b/pybricks/parameters.py @@ -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):