Skip to content

Commit

Permalink
Fix for Multicast to level 4
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 committed Jun 5, 2024
1 parent ba5a2a5 commit af15d4b
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 @@ -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<class radio_t>
Expand Down Expand Up @@ -1122,7 +1125,7 @@ template<class radio_t>
bool ESBNetwork<radio_t>::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 af15d4b

Please sign in to comment.