mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
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>
34 lines
No EOL
1 KiB
C++
34 lines
No EOL
1 KiB
C++
#pragma once
|
|
#include <cstdint> // For uint8_t, uint32_t
|
|
|
|
#define TELEM_MODE_DENY 0
|
|
#define TELEM_MODE_ALLOW_FLAGS 1 // use contact.flags
|
|
#define TELEM_MODE_ALLOW_ALL 2
|
|
|
|
#define ADVERT_LOC_NONE 0
|
|
#define ADVERT_LOC_SHARE 1
|
|
|
|
struct NodePrefs { // persisted to file
|
|
float airtime_factor;
|
|
char node_name[32];
|
|
float freq;
|
|
uint8_t sf;
|
|
uint8_t cr;
|
|
uint8_t multi_acks;
|
|
uint8_t manual_add_contacts;
|
|
float bw;
|
|
int8_t tx_power_dbm;
|
|
uint8_t telemetry_mode_base;
|
|
uint8_t telemetry_mode_loc;
|
|
uint8_t telemetry_mode_env;
|
|
float rx_delay_base;
|
|
uint32_t ble_pin;
|
|
uint8_t advert_loc_policy;
|
|
uint8_t buzzer_quiet;
|
|
uint8_t gps_enabled; // GPS enabled flag (0=disabled, 1=enabled)
|
|
uint32_t gps_interval; // GPS read interval in seconds
|
|
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
|
|
}; |