mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 10:42:08 +00:00
Remove more old router role work.
This commit is contained in:
parent
cb4ca87abe
commit
82591b2a69
@ -27,35 +27,6 @@ bool FloodingRouter::shouldFilterReceived(MeshPacket *p)
|
|||||||
return Router::shouldFilterReceived(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)
|
void FloodingRouter::sniffReceived(const MeshPacket *p, const Routing *c)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -52,22 +52,6 @@ class FloodingRouter : public Router, protected PacketHistory
|
|||||||
*/
|
*/
|
||||||
virtual bool shouldFilterReceived(MeshPacket *p) override;
|
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
|
* Look for broadcasts we need to rebroadcast
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user