Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various improvments to docs #193

Merged
merged 14 commits into from
Jun 12, 2022
Prev Previous commit
Next Next commit
use my fork of breathe
also fixes multi-line function signatures in docs via CSS
  • Loading branch information
2bndy5 committed Jun 11, 2022

Verified

This commit was signed with the committer’s verified signature.
fwyzard Andrea Bocci
commit c5f7d1d0e75198f5aa8e642f1b3c14db2db8b8a5
1 change: 1 addition & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -265,6 +265,7 @@ ALIASES += "see{1}=@rst .. seealso:: \1@endrst"
ALIASES += "important{1}=@rst .. important:: \1@endrst"
ALIASES += "hint{1}=@rst.. hint:: \1@endrst"
ALIASES += "tip{1}=@rst.. tip:: \1@endrst"
ALIASES += "inlinerst=\xmlonly<verbatim>embed:rst:inline "

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
17 changes: 8 additions & 9 deletions RF24Network.h
Original file line number Diff line number Diff line change
@@ -265,11 +265,10 @@ struct RF24NetworkHeader
*
* @note Now supports automatic fragmentation for very long messages, which can be sent as usual if fragmentation is enabled.
*
* Fragmentation is enabled by default for all devices except ATTiny <br>
* Fragmentation is enabled by default for all devices except ATTiny.
* Configure fragmentation and max payload size in RF24Network_config.h
*
* Use this constructor to create a header and then send a message
*
* @code
* uint16_t recipient_address = 011;
*
@@ -299,7 +298,7 @@ struct RF24NetworkHeader
/**
* Frame structure for internal message handling, and for use by external applications
*
* The actual frame put over the air consists of a header (8-bytes) and a message payload (Up to 24-bytes)<br>
* The actual frame put over the air consists of a header (8-bytes) and a message payload (Up to 24-bytes).
* When data is received, it is stored using the RF24NetworkFrame structure, which includes:
* 1. The header containing information about routing the message and the message type
* 2. The size of the included message
@@ -407,7 +406,7 @@ class RF24Network
* **Example 3:** Begin with address 011 (child of 01, grandchild of master)
* @code network.begin(011); @endcode
*
* @see begin(uint8_t _channel, uint16_t _node_address)
* @see begin(uint8_t _channel, uint16_t _node_address) @inlinerst, :cpp:func:`RF24::begin()`@endrst
* @param _node_address The logical address of this node.
*/
inline void begin(uint16_t _node_address)
@@ -758,7 +757,7 @@ class RF24Network
*
* The `frag_ptr` is only used with Arduino (not RPi/Linux) and is mainly used for external data systems like RF24Ethernet. When
* a payload of type @ref EXTERNAL_DATA_TYPE is received, and returned from update(), the `frag_ptr` will always point to the starting
* memory location of the received frame. <br>This is used by external data systems (RF24Ethernet) to immediately copy the received
* memory location of the received frame. This is used by external data systems (RF24Ethernet) to immediately copy the received
* data to a buffer, without using the user-cache.
*
* @see RF24NetworkFrame
@@ -782,21 +781,21 @@ class RF24Network
*
* The following reserved/system message types are handled automatically, and not returned.
*
* | System Message Types <br> (Not Returned) |
* | System Message Types (Not Returned) |
* |-----------------------|
* | @ref NETWORK_ADDR_RESPONSE |
* | @ref NETWORK_ACK |
* | @ref NETWORK_PING |
* | @ref NETWORK_POLL <br>(With multicast enabled) |
* | @ref NETWORK_POLL (With multicast enabled) |
* | @ref NETWORK_REQ_ADDRESS |
*/
bool returnSysMsgs;

/**
* Network Flags allow control of data flow
*
* Incoming Blocking: If the network user-cache is full, lets radio cache fill up. Radio ACKs are not sent when radio internal cache is full.<br>
* This behaviour may seem to result in more failed sends, but the payloads would have otherwise been dropped due to the cache being full.<br>
* Incoming Blocking: If the network user-cache is full, lets radio cache fill up. Radio ACKs are not sent when radio internal cache is full.
* This behaviour may seem to result in more failed sends, but the payloads would have otherwise been dropped due to the cache being full.
*
* | FLAGS | Value | Description |
* |-------|-------|-------------|
32 changes: 32 additions & 0 deletions docs/sphinx/_static/custom_material.css
Original file line number Diff line number Diff line change
@@ -83,18 +83,33 @@ html .md-nav--primary .md-nav__title--site .md-nav__button {
/* ************* temp workaround styling multi-line API signatures ******************* */
/* In the future, we plan to do this without CSS in a more programatic way, but for now... */

.md-typeset dl.objdesc>dt.sig-wrap .m + .sig-paren::before,
.md-typeset dl.api-field>dt.sig-wrap .m + .sig-paren::before,
.md-typeset dl.objdesc>dt.sig-wrap .k + .sig-paren::before,
.md-typeset dl.api-field>dt.sig-wrap .k + .sig-paren::before,
.md-typeset dl.objdesc>dt.sig-wrap .n + .sig-paren::before,
.md-typeset dl.api-field>dt.sig-wrap .n + .sig-paren::before {
content: "\a ";
white-space: pre;
}

.md-typeset dl.objdesc>dt.sig-wrap .sig-paren + .n:not(.sig-param)::before,
.md-typeset dl.api-field>dt.sig-wrap .sig-paren + .reference::before,
.md-typeset dl.objdesc>dt.sig-wrap .sig-paren + .reference::before,
.md-typeset dl.api-field>dt.sig-wrap .sig-paren + .n:not(.sig-param)::before,
.md-typeset dl.api-field>dt.sig-wrap .sig-paren + .k::before,
.md-typeset dl.objdesc>dt.sig-wrap .sig-paren + .k::before,
.md-typeset dl.objdesc>dt.sig-wrap .sig-param + .sig-param::before,
.md-typeset dl.api-field>dt.sig-wrap .n:not(.sig-param) + a::before,
.md-typeset dl.objdesc>dt.sig-wrap .n:not(.sig-param) + a::before,
.md-typeset dl.api-field>dt.sig-wrap a + .n:not(.sig-param)::before,
.md-typeset dl.objdesc>dt.sig-wrap a + .n:not(.sig-param)::before,
.md-typeset dl.api-field>dt.sig-wrap .n.sig-param + .k::before,
.md-typeset dl.objdesc>dt.sig-wrap .n.sig-param + .k::before,
.md-typeset dl.api-field>dt.sig-wrap .n.sig-param + .kt::before,
.md-typeset dl.objdesc>dt.sig-wrap .n.sig-param + .kt::before,
.md-typeset dl.api-field>dt.sig-wrap .n.sig-param + .n:not(.sig-param)::before,
.md-typeset dl.objdesc>dt.sig-wrap .n:not(.sig-param) + .n:not(.sig-param)::before,
.md-typeset dl.objdesc>dt.sig-wrap .n.sig-param + .n:not(.sig-param)::before {
content: "\a ";
white-space: break-spaces;
@@ -105,3 +120,20 @@ html .md-nav--primary .md-nav__title--site .md-nav__button {
content: unset;
white-space: pre;
}

/* CSS for Remark admonitions (translated by breathe from doxygen's @remark(s) cmd */
:root {
--md-admonition-icon--remark: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>')
}
.md-typeset .admonition.remark {
border-color: rgb(116, 66, 255);
}
.md-typeset .remark > .admonition-title {
background-color: rgba(116, 66, 255, 0.1);
border-color: rgb(116, 66, 255);
}
.md-typeset .remark > .admonition-title::before {
background-color: rgb(116, 66, 255);
-webkit-mask-image: var(--md-admonition-icon--remark);
mask-image: var(--md-admonition-icon--remark);
}
23 changes: 13 additions & 10 deletions docs/sphinx/conf.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
"""Configuration file for the Sphinx documentation builder.

This file only contains a selection of the most common options. For a full
list see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

import subprocess
import os
import json

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import subprocess
import os
import json

# pylint: disable=invalid-name

# -- Project information -----------------------------------------------------

@@ -124,7 +127,7 @@
"repo_name": "RF24Network",
"repo_type": "github",
# Visible levels of the global TOC; -1 means unlimited
"globaltoc_depth": 3,
"globaltoc_depth": -1,
# If False, expand all TOC entries
"globaltoc_collapse": False,
# If True, show hidden TOC entries
2 changes: 1 addition & 1 deletion docs/sphinx/examples/Arduino/Network_Ping_Sleep.rst
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ dropping network power consumption dramatically compared to previous capabilitie
The displayed ``millis()`` count will give an indication of how much a node has been sleeping compared to the others, as ``millis()`` will
not increment while a node sleeps.

- Using this sketch, each node will send a ping to every other node in the network every few seconds.<br>
- Using this sketch, each node will send a ping to every other node in the network every few seconds.
- The RF24Network library will route the message across the mesh to the correct node.

.. literalinclude:: ../../../../examples/Network_Ping_Sleep/Network_Ping_Sleep.ino
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
breathe
git+https://github.com/2bndy5/breathe@remix
sphinx-immaterial