more clear variable name

This commit is contained in:
medentem 2024-12-31 09:00:46 -06:00
parent de5256d0b4
commit ef4850ec8c
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ void FloodingRouter::mergeMyCoverage(CoverageFilter &coverage)
} }
} }
float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming, NodeNum lastSender) float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming, NodeNum from)
{ {
// If we are a router or repeater, always forward because it's assumed these are in the most advantageous locations // If we are a router or repeater, always forward because it's assumed these are in the most advantageous locations
if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER || if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||
@ -180,7 +180,7 @@ float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming
int neighbors = 0; int neighbors = 0;
for (auto nodeId : recentNeighbors) { for (auto nodeId : recentNeighbors) {
// Don't count the person we got this packet from // Don't count the person we got this packet from
if (nodeId == lastSender) continue; if (nodeId == from) continue;
neighbors++; neighbors++;

View File

@ -42,7 +42,7 @@ class FloodingRouter : public Router, protected PacketHistory
void mergeMyCoverage(CoverageFilter &coverage); void mergeMyCoverage(CoverageFilter &coverage);
float calculateForwardProbability(const CoverageFilter &incoming, NodeNum lastSender); float calculateForwardProbability(const CoverageFilter &incoming, NodeNum from);
public: public:
/** /**