-
Notifications
You must be signed in to change notification settings - Fork 152
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
Enhance checkConnection() function #240
Conversation
- Define MESH_CONNECTION_CHECK_ATTEMPTS - Return from checkConnection() if -2 received, retry if -1, success if address matches, fail otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think a return
statement needs to be followed by a break
statement in a switch
block.
Co-authored-by: Brendan <2bndy5@gmail.com>
* Modify checkConnection() - Define MESH_CONNECTION_CHECK_ATTEMPTS - Return from checkConnection() if -2 received, retry if -1, success if address matches, fail otherwise * Update RF24Mesh_config.h Co-authored-by: Brendan <2bndy5@gmail.com> * Remove breaks; from switch - Per @2bndy5 in #240 * Update comment --------- Co-authored-by: Brendan <2bndy5@gmail.com>
cherry-picked to v1.x |
Did you want to try that new bump-n-release workflow? Or do you have some more pleasant surprises in store? |
I'm planning to do a little more coding over the next week or so, so lets see if I come up with anything else. This one I just came across while glancing at the code... |
checkConnection() function:
checkConnection()
if -2 received (not in list or default address)This should enhance stability a bit by raising the connection check attempts to 3.
It should also enhance the actual connection check by returning immediately and not retrying if a -2 is received (not in list or default address).
Furthermore it actually verifies that the returned RF24Network address matches the existing RF24Network address.