From 2bd149a1212311ca420255186c23a98d7a905567 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 3 Feb 2020 11:35:43 +0100 Subject: [PATCH] doc/iodevices: reorganize TOC Make the heading levels match the module. No subcategories, but say which devices are available on EV3 only. --- doc/api/iodevices.rst | 18 ++++++++---------- doc/api/iodevices_ev3.inc | 4 +++- doc/api/iodevices_pup.inc | 3 --- pybricks/iodevices.py | 3 ++- 4 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 doc/api/iodevices_pup.inc diff --git a/doc/api/iodevices.rst b/doc/api/iodevices.rst index 033dd24..bed5c84 100644 --- a/doc/api/iodevices.rst +++ b/doc/api/iodevices.rst @@ -4,16 +4,14 @@ .. automodule:: pybricks.iodevices :no-members: -EV3 -################## +LUMP Device +^^^^^^^^^^^^^ +.. autoclass:: pybricks.iodevices.LUMPDevice -The following classes are only available on the EV3. +.. raw:: html + +

EV3 Only

+ +The classes listed below are **only available on the EV3**. .. include:: iodevices_ev3.inc - -Powered Up -######################## - -The following class is available on Powered Up hubs only. - -.. include:: iodevices_pup.inc diff --git a/doc/api/iodevices_ev3.inc b/doc/api/iodevices_ev3.inc index 27a7fbe..0fd269c 100644 --- a/doc/api/iodevices_ev3.inc +++ b/doc/api/iodevices_ev3.inc @@ -65,6 +65,8 @@ UART Device DC Motor ^^^^^^^^^^^^ +This class can be used to control classic LEGO motors using converter cables. + .. autoclass:: pybricks.builtins.DCMotor :noindex: :no-members: @@ -72,7 +74,7 @@ DC Motor .. automethod:: pybricks.builtins.DCMotor.dc :noindex: -Other ev3dev sensors +Ev3dev sensors ^^^^^^^^^^^^^^^^^^^^^ EV3 MicroPython is built on top of ev3dev, which means that a particular sensor diff --git a/doc/api/iodevices_pup.inc b/doc/api/iodevices_pup.inc deleted file mode 100644 index efb80e4..0000000 --- a/doc/api/iodevices_pup.inc +++ /dev/null @@ -1,3 +0,0 @@ -LUMP Device -^^^^^^^^^^^^^ -.. autoclass:: pybricks.iodevices.LUMPDevice diff --git a/pybricks/iodevices.py b/pybricks/iodevices.py index e2c7886..5daf82e 100644 --- a/pybricks/iodevices.py +++ b/pybricks/iodevices.py @@ -24,7 +24,8 @@ class LUMPDevice(): pass def write(self, mode, values): - """Write values to the sensor. + """Write values to the sensor. Only selected sensors and modes support + this. Arguments: mode (``int``): Device mode.