diff --git a/meshtastic/deviceonly.options b/meshtastic/deviceonly.options index 71ceaa0..aa33cc2 100644 --- a/meshtastic/deviceonly.options +++ b/meshtastic/deviceonly.options @@ -2,8 +2,12 @@ # https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options # FIXME pick a higher number someday? or do dynamic alloc in nanopb? -*DeviceState.node_db max_count:40 -*DeviceState.node_db_neighbors max_count: 40 +# As of April 2023, the size of a NodeInfo packet is approx. 130 bytes. We previously +# capped storage at 80 such packets. The size of a Neighbor is 12 bytes, meaning we can fit +# 10 for every NodeInfo. Thus, our footprint for storing 20 Neighbors in the DB is a little under +# 2 NodeInfo. +*DeviceState.node_db max_count:78 +*DeviceState.node_db_neighbors max_count:20 # FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM *DeviceState.receive_queue max_count:1 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 3768d22..9a2ccdb 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1396,7 +1396,7 @@ message NeighborInfo { */ uint32 node_id = 1; /* - * The node ID of the node sending info on its neighbors + * Field to pass neighbor info for the next sending cycle */ uint32 last_sent_by_id = 2; /*