don't send messages the phone sent us back towards the phone

This commit is contained in:
Kevin Hester
2021-03-05 10:19:27 +08:00
parent 2f6034b067
commit 950b32232f
20 changed files with 87 additions and 58 deletions

View File

@@ -32,4 +32,10 @@ typedef uint32_t PacketId; // A packet sequence number
typedef int ErrorCode;
/// Alloc and free packets to our global, ISR safe pool
extern Allocator<MeshPacket> &packetPool;
extern Allocator<MeshPacket> &packetPool;
/**
* Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on the local node.
* If from is zero this function returns our node number instead
*/
NodeNum getFrom(const MeshPacket *p);