From 5bbbff25509cbc877f5722e4a08be2e6ab945617 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Wed, 13 Jan 2021 15:13:51 +0100 Subject: [PATCH] doc/messaging: expand examples Drop use of toggle via plugin. --- doc/api/messaging.rst | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/doc/api/messaging.rst b/doc/api/messaging.rst index a41789a..e2668a0 100644 --- a/doc/api/messaging.rst +++ b/doc/api/messaging.rst @@ -64,25 +64,6 @@ and the client can send a message to the server. An example network with one server and one clients. -.. toggle-header:: - :header: **Show/hide full server example** - - **Example: EV3 Bluetooth Server.** - - This is the full version of the excerpt shown in :numref:`fig_messaging`. - - .. literalinclude:: ../../examples/ev3/bluetooth_server/server.py - -.. toggle-header:: - :header: **Show/hide full client example** - - **Example: EV3 Bluetooth Client.** - - This is the full version of the excerpt shown in :numref:`fig_messaging`. - - .. literalinclude:: ../../examples/ev3/bluetooth_client/client.py - - The only difference between the client and the server is which one initiates the connection at the beginning of the program: @@ -123,6 +104,21 @@ numbers, or text), you can choose one of the Mailboxes below. .. autoclass:: TextMailbox :no-members: +Examples +----------------- + +**EV3 Bluetooth Server** + +This is the full version of the excerpt shown in :numref:`fig_messaging`. + +.. literalinclude:: ../../examples/ev3/bluetooth_server/server.py + +**EV3 Bluetooth Client** + +This is the full version of the excerpt shown in :numref:`fig_messaging`. + +.. literalinclude:: ../../examples/ev3/bluetooth_client/client.py + Making bigger networks ----------------------