From 02ae24b6fa7fb66b9126fb8a24e7b9f55e88e698 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Fri, 9 Aug 2024 09:08:14 +0800 Subject: [PATCH] Remove outdated comments (#4417) These comments from four years ago no longer reflect how things work. --- src/mesh/MeshService.cpp | 15 +-------------- src/mesh/Router.cpp | 10 +--------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index fd07c3801c..07dd71ddcc 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -44,17 +44,6 @@ arbitrating to select a node number and keeping the current nodedb. The algorithm is as follows: * when a node starts up, it broadcasts their user and the normal flow is for all other nodes to reply with their User as well (so the new node can build its node db) -* If a node ever receives a User (not just the first broadcast) message where the sender node number equals our node number, that -indicates a collision has occurred and the following steps should happen: - -If the receiving node (that was already in the mesh)'s macaddr is LOWER than the new User who just tried to sign in: it gets to -keep its nodenum. We send a broadcast message of OUR User (we use a broadcast so that the other node can receive our message, -considering we have the same id - it also serves to let observers correct their nodedb) - this case is rare so it should be okay. - -If any node receives a User where the macaddr is GTE than their local macaddr, they have been vetoed and should pick a new random -nodenum (filtering against whatever it knows about the nodedb) and rebroadcast their User. - -FIXME in the initial proof of concept we just skip the entire want/deny flow and just hand pick node numbers at first. */ MeshService *service; @@ -77,8 +66,6 @@ MeshService::MeshService() void MeshService::init() { - // moved much earlier in boot (called from setup()) - // nodeDB.init(); #if HAS_GPS if (gps) gpsObserver.observe(&gps->newStatus); @@ -405,4 +392,4 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus) bool MeshService::isToPhoneQueueEmpty() { return toPhoneQueue.isEmpty(); -} \ No newline at end of file +} diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index 1260b7c045..87fcfe1b67 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -19,14 +19,6 @@ #include "serialization/MeshPacketSerializer.h" #endif #include "../userPrefs.h" -/** - * Router todo - * - * DONE: Implement basic interface and use it elsewhere in app - * Add naive flooding mixin (& drop duplicate rx broadcasts), add tools for sending broadcasts with incrementing sequence #s - * Add an optional adjacent node only 'send with ack' mixin. If we timeout waiting for the ack, call handleAckTimeout(packet) - * - **/ #define MAX_RX_FROMRADIO \ 4 // max number of packets destined to our queue, we dispatch packets quickly so it doesn't need to be big @@ -546,4 +538,4 @@ void Router::perhapsHandleReceived(meshtastic_MeshPacket *p) handleReceived(p); packetPool.release(p); -} \ No newline at end of file +}