mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-14 00:52:05 +00:00
DSR wip still kinda busted (rx packets not working - even for regular router)
This commit is contained in:
parent
5bd3e4bcd0
commit
8f1b26bdda
@ -23,8 +23,9 @@ reliable messaging tasks (stage one for DSR):
|
|||||||
|
|
||||||
dsr tasks
|
dsr tasks
|
||||||
|
|
||||||
- Don't use broadcasts for the network pings (close open github issue)
|
- oops I might have broken message reception
|
||||||
- add ignoreSenders to radioconfig to allow testing different mesh topologies by refusing to see certain senders
|
- DONE Don't use broadcasts for the network pings (close open github issue)
|
||||||
|
- DONE add ignoreSenders to radioconfig to allow testing different mesh topologies by refusing to see certain senders
|
||||||
- test multihop delivery with the python framework
|
- test multihop delivery with the python framework
|
||||||
|
|
||||||
optimizations / low priority:
|
optimizations / low priority:
|
||||||
|
@ -201,14 +201,16 @@ void Router::handleReceived(MeshPacket *p)
|
|||||||
void Router::perhapsHandleReceived(MeshPacket *p)
|
void Router::perhapsHandleReceived(MeshPacket *p)
|
||||||
{
|
{
|
||||||
assert(radioConfig.has_preferences);
|
assert(radioConfig.has_preferences);
|
||||||
bool inIgnore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
|
bool ignore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
|
||||||
|
|
||||||
if (inIgnore)
|
if (ignore)
|
||||||
DEBUG_MSG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from);
|
DEBUG_MSG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from);
|
||||||
|
else if (ignore |= shouldFilterReceived(p))
|
||||||
|
DEBUG_MSG("Incoming message was filtered 0x%x\n", p->from);
|
||||||
|
|
||||||
// Note: we avoid calling shouldFilterReceived if we are supposed to ignore certain nodes - because some overrides might
|
// Note: we avoid calling shouldFilterReceived if we are supposed to ignore certain nodes - because some overrides might
|
||||||
// cache/learn of the existence of nodes (i.e. FloodRouter) that they should not
|
// cache/learn of the existence of nodes (i.e. FloodRouter) that they should not
|
||||||
if (!inIgnore && !shouldFilterReceived(p))
|
if (!ignore)
|
||||||
handleReceived(p);
|
handleReceived(p);
|
||||||
|
|
||||||
packetPool.release(p);
|
packetPool.release(p);
|
||||||
|
@ -67,7 +67,7 @@ bool writecb(pb_ostream_t *stream, const uint8_t *buf, size_t count)
|
|||||||
|
|
||||||
bool is_in_helper(uint32_t n, const uint32_t *array, pb_size_t count)
|
bool is_in_helper(uint32_t n, const uint32_t *array, pb_size_t count)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < count; i++)
|
for (pb_size_t i = 0; i < count; i++)
|
||||||
if (array[i] == n)
|
if (array[i] == n)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user