Remove more old router role work.

pull/1292/head
Jm Casler 2022-03-13 14:50:27 -07:00
rodzic cb4ca87abe
commit 82591b2a69
2 zmienionych plików z 0 dodań i 45 usunięć

Wyświetl plik

@ -27,35 +27,6 @@ bool FloodingRouter::shouldFilterReceived(MeshPacket *p)
return Router::shouldFilterReceived(p);
}
bool FloodingRouter::inRangeOfRouter()
{
uint32_t maximum_router_sec = 300;
// FIXME : Scale minimum_snr to accomodate different modem configurations.
float minimum_snr = 2;
for (int i = 0; i < myNodeInfo.router_count; i++) {
// A router has been seen and the heartbeat was heard within the last 300 seconds
if (
((myNodeInfo.router_sec[i] > 0) && (myNodeInfo.router_sec[i] < maximum_router_sec)) &&
(myNodeInfo.router_snr[i] > minimum_snr)
) {
return true;
}
}
return false;
}
bool FloodingRouter::isPacketLocal(const MeshPacket *p)
{
// TODO: Figure out if a packet is from a local node
return false;
}
void FloodingRouter::sniffReceived(const MeshPacket *p, const Routing *c)
{

Wyświetl plik

@ -52,22 +52,6 @@ class FloodingRouter : public Router, protected PacketHistory
*/
virtual bool shouldFilterReceived(MeshPacket *p) override;
/**
* Are we in range of a router?
*
* "range" here may not be the right term.
* @return true if we're in range of a router
*/
virtual bool inRangeOfRouter();
/**
* Is the packet from a device that is physically near this node?
*
* Calculated based on the received SNR.
* @return true if the received packet is physically close to this node.
*/
virtual bool isPacketLocal(const MeshPacket *p);
/**
* Look for broadcasts we need to rebroadcast
*/