NodePrefs.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <cstdint> // For uint8_t, uint32_t
  3. #define TELEM_MODE_DENY 0
  4. #define TELEM_MODE_ALLOW_FLAGS 1 // use contact.flags
  5. #define TELEM_MODE_ALLOW_ALL 2
  6. #define ADVERT_LOC_NONE 0
  7. #define ADVERT_LOC_SHARE 1
  8. struct NodePrefs { // persisted to file
  9. float airtime_factor;
  10. char node_name[32];
  11. float freq;
  12. uint8_t sf;
  13. uint8_t cr;
  14. uint8_t multi_acks;
  15. uint8_t manual_add_contacts;
  16. float bw;
  17. int8_t tx_power_dbm;
  18. uint8_t telemetry_mode_base;
  19. uint8_t telemetry_mode_loc;
  20. uint8_t telemetry_mode_env;
  21. float rx_delay_base;
  22. uint32_t ble_pin;
  23. uint8_t advert_loc_policy;
  24. uint8_t buzzer_quiet;
  25. uint8_t gps_enabled; // GPS enabled flag (0=disabled, 1=enabled)
  26. uint32_t gps_interval; // GPS read interval in seconds
  27. uint8_t autoadd_config; // bitmask for auto-add contacts config
  28. uint8_t rx_boosted_gain; // SX126x RX boosted gain mode (0=power saving, 1=boosted)
  29. uint8_t client_repeat;
  30. uint8_t path_hash_mode; // which path mode to use when sending
  31. uint8_t autoadd_max_hops; // 0 = no limit, 1 = direct (0 hops), N = up to N-1 hops (max 64)
  32. };