Add rxDupe, txRelay and txRelayCanceled to LocalStats (#4936)

* Introduce `isFromUs()` and `isToUs()`

* Add rxDupe, txRelay and txRelayCanceled to LocalStats
This commit is contained in:
GUVWAF
2024-10-04 13:28:51 +02:00
committed by GitHub
parent 236374491b
commit 673fe294f3
22 changed files with 71 additions and 44 deletions

View File

@@ -196,6 +196,18 @@ NodeNum getFrom(const meshtastic_MeshPacket *p)
return (p->from == 0) ? nodeDB->getNodeNum() : p->from;
}
// Returns true if the packet originated from the local node
bool isFromUs(const meshtastic_MeshPacket *p)
{
return p->from == 0 || p->from == nodeDB->getNodeNum();
}
// Returns true if the packet is destined to us
bool isToUs(const meshtastic_MeshPacket *p)
{
return p->to == nodeDB->getNodeNum();
}
bool NodeDB::resetRadioConfig(bool factory_reset)
{
bool didFactoryReset = false;