Browse Source

Fix bug in rfm69 that counted packets twice

refactor-terminal
Xose Pérez 5 years ago
parent
commit
4586f07e52
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      code/espurna/rfm69.ino

+ 1
- 2
code/espurna/rfm69.ino View File

@ -118,9 +118,8 @@ void _rfm69Process(packet_t * data) {
// Is node beyond RFM69_MAX_NODES? // Is node beyond RFM69_MAX_NODES?
if (data->senderID >= RFM69_MAX_NODES) return; if (data->senderID >= RFM69_MAX_NODES) return;
// Count seen nodes and packets
// Count seen nodes
if (_rfm69_node_info[data->senderID].count == 0) ++_rfm69_node_count; if (_rfm69_node_info[data->senderID].count == 0) ++_rfm69_node_count;
++_rfm69_packet_count;
// Detect duplicates and missing packets // Detect duplicates and missing packets
// packetID==0 means device is not sending packetID info // packetID==0 means device is not sending packetID info


Loading…
Cancel
Save