Skip to content

Commit 36e35c4

Browse files
authored
Fix for Multicast to level 4 (#227)
#226 - Define NETWORK_MULTICAST_ADDRESS_LEVEL_2 and NETWORK_MULTICAST_ADDRESS_LEVEL_4 - Add the above to valid addresses in `is_valid_address();`
1 parent ba5a2a5 commit 36e35c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

RF24Network.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ volatile bool wasInterrupted;
4646
#endif
4747
uint16_t RF24NetworkHeader::next_id = 1;
4848

49+
#define NETWORK_MULTICAST_ADDRESS_LEVEL_2 010
50+
#define NETWORK_MULTICAST_ADDRESS_LEVEL_4 01000
51+
4952
#if defined(RF24_LINUX)
5053
/******************************************************************/
5154
template<class radio_t>
@@ -1122,7 +1125,7 @@ template<class radio_t>
11221125
bool ESBNetwork<radio_t>::is_valid_address(uint16_t node)
11231126
{
11241127
bool result = true;
1125-
if (node == NETWORK_MULTICAST_ADDRESS || node == 010) {
1128+
if (node == NETWORK_MULTICAST_ADDRESS || node == NETWORK_MULTICAST_ADDRESS_LEVEL_2 || node == NETWORK_MULTICAST_ADDRESS_LEVEL_4) {
11261129
return result;
11271130
}
11281131
uint8_t count = 0;

0 commit comments

Comments
 (0)