Skip to content

Commit 565710b

Browse files
TMRh202bndy5
andauthored
Return on setAddress if nodeID is non-zero (#255)
* Return on setAddress if nodeID is non-zero Fixes nRF24/RF24Gateway#28 Co-authored-by: Brendan <2bndy5@gmail.com> --------- Co-authored-by: Brendan <2bndy5@gmail.com>
1 parent 7baf483 commit 565710b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

RF24Mesh.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,11 @@ void ESBMesh<network_t, radio_t>::setStaticAddress(uint8_t nodeID, uint16_t addr
472472
template<class network_t, class radio_t>
473473
void ESBMesh<network_t, radio_t>::setAddress(uint8_t nodeID, uint16_t address, bool searchBy)
474474
{
475+
476+
if (_nodeID) {
477+
return;
478+
}
479+
475480
//Look for the node in the list
476481
for (uint8_t i = 0; i < addrListTop; i++) {
477482
if (searchBy == false) {

0 commit comments

Comments
 (0)