From 41f0fece71d89de0103942ae854801506717d28e Mon Sep 17 00:00:00 2001 From: Sven Kopetzki Date: Mon, 1 Oct 2018 20:53:37 +0200 Subject: [PATCH] -Fix for issue #1239 "Clear counts" on rfm69 does not reset node count properly. --- code/espurna/rfm69.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/espurna/rfm69.ino b/code/espurna/rfm69.ino index 9f9d9e09..8aa713f1 100644 --- a/code/espurna/rfm69.ino +++ b/code/espurna/rfm69.ino @@ -235,9 +235,10 @@ void _rfm69Loop() { } 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;