diff --git a/doc/api/geometry.rst b/doc/api/geometry.rst index c8dd7eb..7deeda4 100644 --- a/doc/api/geometry.rst +++ b/doc/api/geometry.rst @@ -45,5 +45,5 @@ though the *hub* accelerates backward. How to configure the ``top_side`` and ``front_side`` settings for three different robot designs. The same technique can be applied to other hubs and other creations, by noting which way the top and - front :class:`Side <.parameters.Side>` of the hub are pointing. The example + front :class:`Side ` of the hub are pointing. The example on the left is the default configuration. diff --git a/doc/api/parameters/side.rst b/doc/api/parameters/side.rst index 147f44c..5a7cbcf 100644 --- a/doc/api/parameters/side.rst +++ b/doc/api/parameters/side.rst @@ -1,8 +1,29 @@ Side ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. autoclass:: pybricks.parameters.Side - :no-members: +.. class:: Side + + Side of a hub or a sensor. These devices are + mostly rectangular boxes with six sides: + + .. autoattribute:: pybricks.parameters.Side.TOP + :annotation: + + .. autoattribute:: pybricks.parameters.Side.BOTTOM + :annotation: + + .. autoattribute:: pybricks.parameters.Side.FRONT + :annotation: + + .. autoattribute:: pybricks.parameters.Side.BACK + :annotation: + + .. autoattribute:: pybricks.parameters.Side.LEFT + :annotation: + + .. autoattribute:: pybricks.parameters.Side.RIGHT + :annotation: + Screens or light matrices have only four sides. For those, ``TOP`` is treated the same as ``FRONT``, and ``BOTTOM`` is treated the @@ -11,24 +32,24 @@ Side **Prime Hub** .. figure:: ../../api/images/orientation_primehub_label.png - :height: 15 em + :height: 17 em **Inventor Hub** .. figure:: ../../api/images/orientation_inventorhub_label.png - :height: 15 em + :height: 17 em **Move Hub** .. figure:: ../../api/images/orientation_movehub_label.png - :height: 15 em + :height: 17 em **Technic Hub** .. figure:: ../../api/images/orientation_technichub_label.png - :height: 15 em + :height: 17 em **Tilt Sensor** .. figure:: ../../api/images/orientation_tiltsensor_label.png - :height: 15 em + :height: 17 em diff --git a/pybricks/_common.py b/pybricks/_common.py index 590a31a..c57209d 100644 --- a/pybricks/_common.py +++ b/pybricks/_common.py @@ -792,7 +792,7 @@ class Accelerometer: :returns: ``Side.TOP``, ``Side.BOTTOM``, ``Side.LEFT``, ``Side.RIGHT``, ``Side.FRONT`` or ``Side.BACK``. - :rtype: :class:`Side <.parameters.Side>` + :rtype: :class:`Side` """ pass diff --git a/pybricks/parameters.py b/pybricks/parameters.py index ad65f88..54b7280 100644 --- a/pybricks/parameters.py +++ b/pybricks/parameters.py @@ -155,16 +155,7 @@ class Button(_PybricksEnum): class Side(_PybricksEnum): - """Side of a hub or a sensor. These devices are - mostly rectangular boxes with six sides: - - .. data:: TOP - .. data:: BOTTOM - .. data:: FRONT - .. data:: BACK - .. data:: LEFT - .. data:: RIGHT - """ + """Side of a hub or a sensor.""" RIGHT = 6 FRONT = 0