-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix (library): ESP32-NOW peer removal #10076
Conversation
in the case were _esp_now_del_peer, the peer could never be added again because `added` would always be true and never reset. This forces it to be reset
👋 Hello craiglink, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Test Results 56 files - 83 56 suites - 83 4m 56s ⏱️ - 1h 37m 56s Results for commit 7fa3afd. ± Comparison against base commit f5be003. This pull request removes 9 tests.
♻️ This comment has been updated with latest results. |
Thank you for the PR @craiglink, we will review it soon 👍 |
Hello @craiglink, Is there any way on how to reproduce the issue and see if this is needed at all? |
The problem with only setting |
@craiglink in that case proper solution would be to seta all peers to |
It is break change from 2.0 to 3.0 on esp now. I will watch this. |
That code path is actually broken too. I actually gave up on using this class after seeing all the issues because it seem to brittle. for example arduino-esp32/libraries/ESP_NOW/src/ESP32_NOW.cpp Lines 189 to 202 in 7fa3afd
Similarly if deinit() fails, the peers list won't be reset even though they no longer exist |
@craiglink @awong1900 I am closing this in favour of #10102. |
in the case were _esp_now_del_peer, the peer could never be added again because
added
would always be true and never reset. This forces it to be resetBy completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Description of Change
in the case where _esp_now_del_peer API calls,, the peer could never be added again by the C++ class because
added
would always be true and never reset. This forces 'added' to be reset, regardless of the api call.Tests scenarios
Fixes a issue in WLED code where a broadcast peer couldn't be added a second time during restart. Run on an ESP32 dig2go board.