mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 03:29:17 +00:00
more clear variable name
This commit is contained in:
parent
de5256d0b4
commit
ef4850ec8c
@ -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++;
|
||||||
|
|
||||||
|
@ -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:
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user