-
Notifications
You must be signed in to change notification settings - Fork 639
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
"Clear counts" on rfm69 does not reset node count properly. #1239
Labels
Milestone
Comments
Good catch!
Care to raise a PR for a fix?
…__
//_
On Oct 1, 2018, at 21:29, Tricx aka Trickx ***@***.***> wrote:
Issue: If the button "Clear counts" is pressed, the node count on the status page does not start to count anymore.
Reason: The reset code does not reset .count.
void _rfm69Clear() {
for(unsigned int i=0; i<255; i++) {
_rfm69_node_info[i].duplicates = 0;
_rfm69_node_info[i].missing = 0;
}
_rfm69_node_count = 0;
_rfm69_packet_count = 0;
}
Solution:
void _rfm69Clear() {
//for(unsigned int i=0; i<255; i++) {
for(unsigned int i=0; i<(sizeof(_rfm69_node_info)/sizeof(_node_t)); i++) {
_rfm69_node_info[i].duplicates = 0;
_rfm69_node_info[i].missing = 0;
_rfm69_node_info [i].count = 0;
}
_rfm69_node_count = 0;
_rfm69_packet_count = 0;
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I would, but my espurna-fork is currently being used for other features - not ready for PR. |
You can always have a new branch :)
Or even use online editor for small changes...
__
//_
… On Oct 1, 2018, at 21:34, Tricx aka Trickx ***@***.***> wrote:
I would, but my espurna-fork is currently being used for other features - not ready for PR.
That's why I posted the fixed code here.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Trickx
added a commit
to Trickx/espurna
that referenced
this issue
Oct 1, 2018
Trickx
added a commit
to Trickx/espurna
that referenced
this issue
Oct 1, 2018
…node count properly.
-> PR #1241 |
Merged into |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: If the button "Clear counts" is pressed, the node count on the status page does not start to count anymore.
Reason: The reset code does not reset .count.
Solution:
The text was updated successfully, but these errors were encountered: