Skip to content

Commit

Permalink
Remove outdated comments (#4417)
Browse files Browse the repository at this point in the history
These comments from four years ago no longer reflect how things
work.
  • Loading branch information
fifieldt authored Aug 9, 2024
1 parent 5111bd7 commit 02ae24b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
15 changes: 1 addition & 14 deletions src/mesh/MeshService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -405,4 +392,4 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus)
bool MeshService::isToPhoneQueueEmpty()
{
return toPhoneQueue.isEmpty();
}
}
10 changes: 1 addition & 9 deletions src/mesh/Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -546,4 +538,4 @@ void Router::perhapsHandleReceived(meshtastic_MeshPacket *p)
handleReceived(p);

packetPool.release(p);
}
}

0 comments on commit 02ae24b

Please sign in to comment.