Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add releaseAddress() overload for use on master nodes #219

Closed
2bndy5 opened this issue Feb 16, 2023 · 0 comments · Fixed by #244
Closed

add releaseAddress() overload for use on master nodes #219

2bndy5 opened this issue Feb 16, 2023 · 0 comments · Fixed by #244

Comments

@2bndy5
Copy link
Member

2bndy5 commented Feb 16, 2023

This idea is born from #218 discussion in which I thought it would be easier on users' code to provide a local way of releasing an assigned address in the master node's addrList. The main benefits are

  1. keep bounds checking on addrList internally implemented
  2. ensure the proper value (0) is assigned to the reserved addresses upon release.

Proposal

Basically I want to

#ifndef MESH_NO_MASTER
inline void RF24Mesh::releaseAddress(uint16_t address)
{
    for (uint8_t i = 0; i < addrListTop; ++i) { 
         if (addrList[i].address == address) { 
             addrList[i].address = 0; 
             break; // avoid further non-op iterations
         } 
     } 
}
#endif

PS - I opened this issue as a reminder.

2bndy5 added a commit that referenced this issue Jun 18, 2024
2bndy5 added a commit that referenced this issue Jun 20, 2024
* resolves #219
* expose mesh_address in python wrapper
* fix py bindings for getNodeID() and renewAddress()
* don't expose addrList due to unsatisfied  implementation details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant