mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
Add rxDupe, txRelay and txRelayCanceled to LocalStats (#4936)
* Introduce `isFromUs()` and `isToUs()` * Add rxDupe, txRelay and txRelayCanceled to LocalStats
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user