From ab1f58c2cc6054178d221b6f9fa19bf7f6536c1b Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 29 Dec 2020 14:42:11 +0100 Subject: [PATCH] doc/pupdevices/InfraredSensor: split examples Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support. --- doc/api/pupdevices/infraredsensor.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/api/pupdevices/infraredsensor.rst b/doc/api/pupdevices/infraredsensor.rst index 430e173..2cb4ab5 100644 --- a/doc/api/pupdevices/infraredsensor.rst +++ b/doc/api/pupdevices/infraredsensor.rst @@ -4,14 +4,6 @@ Infrared Sensor .. figure:: ../../api/images/sensor_proximity.png :width: 35 % -.. toggle-header:: - :header: **Show/hide example** - - **Example: Measuring distance, object count, and reflection** - - .. literalinclude:: - ../../../examples/pup/sensor_infrared/basics.py - .. autoclass:: pybricks.pupdevices.InfraredSensor :no-members: @@ -20,3 +12,12 @@ Infrared Sensor .. automethod:: pybricks.pupdevices.InfraredSensor.reflection .. automethod:: pybricks.pupdevices.InfraredSensor.count + +Examples +------------------- + +Measuring distance, object count, and reflection +************************************************ + +.. literalinclude:: + ../../../examples/pup/sensor_infrared/basics.py