Skip to content

Commit 2cb0877

Browse files
wbijenclaude
andcommitted
Clarify comment wording: 1 = direct (0 hops)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c016db8 commit 2cb0877

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/companion_radio/NodePrefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ struct NodePrefs { // persisted to file
3030
uint8_t autoadd_config; // bitmask for auto-add contacts config
3131
uint8_t client_repeat;
3232
uint8_t path_hash_mode; // which path mode to use when sending
33-
uint8_t autoadd_max_hops; // 0 = no limit, 1 = direct only, N = up to N-1 hops (max 63)
33+
uint8_t autoadd_max_hops; // 0 = no limit, 1 = direct (0 hops), N = up to N-1 hops (max 63)
3434
};

src/helpers/BaseChatMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
141141
return;
142142
}
143143

144-
// check hop limit for new contacts (0 = no limit, 1 = direct only, N = up to N-1 hops)
144+
// check hop limit for new contacts (0 = no limit, 1 = direct (0 hops), N = up to N-1 hops)
145145
uint8_t max_hops = getAutoAddMaxHops();
146146
if (max_hops > 0 && packet->getPathHashCount() >= max_hops) {
147147
ContactInfo ci;

src/helpers/BaseChatMesh.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class BaseChatMesh : public mesh::Mesh {
9898
virtual bool shouldAutoAddContactType(uint8_t type) const { return true; }
9999
virtual void onContactsFull() {};
100100
virtual bool shouldOverwriteWhenFull() const { return false; }
101-
virtual uint8_t getAutoAddMaxHops() const { return 0; } // 0 = no limit, 1 = direct only, N = up to N-1 hops
101+
virtual uint8_t getAutoAddMaxHops() const { return 0; } // 0 = no limit, 1 = direct (0 hops), N = up to N-1 hops
102102
virtual void onContactOverwrite(const uint8_t* pub_key) {};
103103
virtual void onDiscoveredContact(ContactInfo& contact, bool is_new, uint8_t path_len, const uint8_t* path) = 0;
104104
virtual ContactInfo* processAck(const uint8_t *data) = 0;

0 commit comments

Comments
 (0)