Skip to content

Commit

Permalink
update some docs; use macro instead of def'd value
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jul 2, 2021
1 parent 72533fe commit 9f2e62b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ option(SERIAL_DEBUG_FRAGMENTATION_L2
"enable/disable debugging output related to fragmented messages' transmission success"
OFF
)
option(DISABLE_FRAGMENTATION"disable message fragmentation" OFF)
option(DISABLE_FRAGMENTATION "disable message fragmentation" OFF)
option(DISABLE_DYNAMIC_PAYLOADS "force usage of static payload size" OFF)

# detect CPU and add compiler flags accordingly
Expand Down
2 changes: 1 addition & 1 deletion RF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ uint8_t RF24Network::update(void)
write(header->to_node, TX_NORMAL);
continue;
}
if ((returnSysMsgs && header->type > 127) || header->type == NETWORK_ACK) {
if ((returnSysMsgs && header->type > MAX_USER_DEFINED_HEADER_TYPE) || header->type == NETWORK_ACK) {
IF_SERIAL_DEBUG_ROUTING(printf_P(PSTR("%lu MAC: System payload rcvd %d\n"), millis(), returnVal););
if (header->type != NETWORK_FIRST_FRAGMENT && header->type != NETWORK_MORE_FRAGMENTS && header->type != EXTERNAL_DATA_TYPE && header->type != NETWORK_LAST_FRAGMENT) {
return returnVal;
Expand Down
1 change: 1 addition & 0 deletions RF24Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ class RF24Network
* Calling begin brings up the network, and configures the address, which designates the location of the node within RF24Network topology.
* @note Node addresses are specified in Octal format, see [RF24Network Addressing](md_docs_addressing.html) for more information.
* @warning Be sure to first call `RF24::begin()` to initialize the radio properly.
* @note The address `04444` is resreved for RF24Mesh usage
*
* **Example 1:** Begin on current radio channel with address 0 (master node)
* @code
Expand Down
35 changes: 16 additions & 19 deletions RF24Network_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,34 @@
#ifndef __RF24NETWORK_CONFIG_H__
#define __RF24NETWORK_CONFIG_H__

/** @brief A reserved valid address for use with RF24Mesh (when a mesh node requests an assigned address) */
#ifndef NETWORK_DEFAULT_ADDRESS
#define NETWORK_DEFAULT_ADDRESS 04444
#endif // NETWORK_DEFAULT_ADDRESS

#ifndef NETWORK_MULTICAST_ADDRESS
#define NETWORK_MULTICAST_ADDRESS 0100
#endif // NETWORK_MULTICAST_ADDRESS
/** @brief A sentinel address value for multicasting purposes */
#define NETWORK_MULTICAST_ADDRESS 0100

#ifndef NETWORK_AUTO_ROUTING
#define NETWORK_AUTO_ROUTING 070
#endif // NETWORK_AUTO_ROUTING
/** @brief A sentinel value for internally indicating that the frame should be automatically routed as necessary */
#define NETWORK_AUTO_ROUTING 070

#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__)

/********** USER CONFIG - non ATTiny **************/

//#define ENABLE_SLEEP_MODE //AVR only
/** @brief When defined, this will allow the use of multicasting messages */
#define RF24NetworkMulticast

/* *
* \def
* Saves memory by disabling fragmentation
*/
/* Saves memory by disabling fragmentation */
//#define DISABLE_FRAGMENTATION

/** System defines */
/* System defines */

/** Maximum size of fragmented network frames and fragmentation cache.
*
* @note: This buffer can now be any size > 24. Previously need to be a multiple of 24.
* @note: If used with RF24Ethernet, this value is used to set the buffer sizes.
/**
* @brief Maximum size of fragmented network frames and fragmentation cache.
* @note This buffer can now be any size > 24. Previously this needed to be a multiple of 24 (changed in v1.0.15).
* @note If used with RF24Ethernet, this value is used to set the buffer sizes.
*/
#ifndef MAX_PAYLOAD_SIZE
#define MAX_PAYLOAD_SIZE 144
Expand All @@ -53,18 +50,18 @@
#define MAIN_BUFFER_SIZE (MAX_PAYLOAD_SIZE + FRAME_HEADER_SIZE)


/** Disable user payloads. Saves memory when used with RF24Ethernet or software that uses external data.*/
/* Disable user payloads. Saves memory when used with RF24Ethernet or software that uses external data.*/
//#define DISABLE_USER_PAYLOADS

/** Enable tracking of success and failures for all transmissions, routed and user initiated */
/* Enable tracking of success and failures for all transmissions, routed and user initiated */
//#define ENABLE_NETWORK_STATS

/** Enable dynamic payloads - If using different types of NRF24L01 modules, some may be incompatible when using this feature **/
#ifndef DISABLE_DYNAMIC_PAYLOADS
/** Enable dynamic payloads - If using different types of NRF24L01 modules, some may be incompatible when using this feature **/
#define ENABLE_DYNAMIC_PAYLOADS
#endif // DISABLE_DYNAMIC_PAYLOADS

/** Debug Options */
/* Debug Options */
//#define SERIAL_DEBUG
//#define SERIAL_DEBUG_MINIMAL
//#define SERIAL_DEBUG_ROUTING
Expand Down

0 comments on commit 9f2e62b

Please sign in to comment.