Add configurable max hops filter for auto-add contacts

Filter auto-add of new contacts by hop count (issues #1533, #1546).
Setting is configurable from the companion app via extended
CMD_SET/GET_AUTOADD_CONFIG protocol (0 = no limit, 1-63 = max hops).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Wouter Bijen
2026-03-02 20:41:41 +01:00
parent 06ab9f7f6b
commit 00566741f6
6 changed files with 23 additions and 1 deletions

View File

@@ -30,4 +30,5 @@ struct NodePrefs { // persisted to file
uint8_t autoadd_config; // bitmask for auto-add contacts config
uint8_t client_repeat;
uint8_t path_hash_mode; // which path mode to use when sending
uint8_t autoadd_max_hops; // 0 = no limit, 1-63 = max hops for auto-add
};