From 36e35c4a4cc49ef7e153accc217f924400d0923c Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Wed, 5 Jun 2024 17:52:49 -0600 Subject: [PATCH] Fix for Multicast to level 4 (#227) https://github.com/nRF24/RF24Network/issues/226 - Define NETWORK_MULTICAST_ADDRESS_LEVEL_2 and NETWORK_MULTICAST_ADDRESS_LEVEL_4 - Add the above to valid addresses in `is_valid_address();` --- RF24Network.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index d6edab8b..85793ad0 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -46,6 +46,9 @@ volatile bool wasInterrupted; #endif uint16_t RF24NetworkHeader::next_id = 1; +#define NETWORK_MULTICAST_ADDRESS_LEVEL_2 010 +#define NETWORK_MULTICAST_ADDRESS_LEVEL_4 01000 + #if defined(RF24_LINUX) /******************************************************************/ template @@ -1122,7 +1125,7 @@ template bool ESBNetwork::is_valid_address(uint16_t node) { bool result = true; - if (node == NETWORK_MULTICAST_ADDRESS || node == 010) { + if (node == NETWORK_MULTICAST_ADDRESS || node == NETWORK_MULTICAST_ADDRESS_LEVEL_2 || node == NETWORK_MULTICAST_ADDRESS_LEVEL_4) { return result; } uint8_t count = 0;