Skip to content

Commit

Permalink
Fix for Multicast to level 4 (#227)
Browse files Browse the repository at this point in the history
#226
- Define NETWORK_MULTICAST_ADDRESS_LEVEL_2 and NETWORK_MULTICAST_ADDRESS_LEVEL_4
- Add the above to valid addresses in `is_valid_address();`
  • Loading branch information
TMRh20 authored and 2bndy5 committed Jun 11, 2024
1 parent b5564c1 commit 0a4ac30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,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)
/******************************************************************/

Expand Down Expand Up @@ -1094,7 +1097,7 @@ uint16_t RF24Network::direct_child_route_to(uint16_t node)
bool RF24Network::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;
Expand Down

0 comments on commit 0a4ac30

Please sign in to comment.