Closed TMRh20 closed 3 months ago
I thought pipe 0 was used for receiving from both parents and multicasts. Saying that non-master nodes only support 4 children with multicast enabled sounds inaccurate.
Hmm, nope as far as I recall pipe0 has auto-ack completely disabled after transmission, and is used only for multicast. Child nodes need to support both a multicast pipe and a parent pipe separately, so only 4 nodes with multicast enabled. It also how RF24Mesh sets up addresses (MESH_MAX_CHILDREN is 4 by default, master use MESH_MAX_CHILDREN + 1)
I do remember pondering why MESH_MAX_CHILDREN defaults to 4. Maybe I'm just misremembering.
Hmm now you got me thinking: https://github.com/nRF24/RF24Network/blob/master/RF24Network.cpp#L1134
Should be if (digit < 1 || digit > (NUM_PIPES )) {
to allow for a 6th node...
Pipe numbers are 0 based, but I thought NUM_PIPES is 1 based (for human readability).
You might be overthinking too! It is contagious.
all other usage is NUM_PIPES - 1 excepts
https://github.com/nRF24/RF24Network/blob/f57a95314a0235cc58855d3719f6324c2dcaee9a/RF24Network.cpp#L106-L108
but I think the decrement i--
takes care of the initial - 1.
Just tested on RF24Network example to confirm and yeah it says 06 is an invalid address. Its looking at the first octal number in the address, not the pipe number here.
But there is no pipe 6, so a node 06 won't work anyway ( max of 5 nodes even with multicast disabled ) time to revise the documentation again lol.. wish I knew how my own library worked haha
My memory about how all this gets implemented is getting a bit fuzzy. I think its only natural.