mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
New "Home Pages" section in Settings lets the user toggle which pages appear in the home screen carousel. Settings and Messages are always shown; Clock, Recent, Radio, Bluetooth, Advert, GPS, Sensors, Tools and Shutdown can each be hidden individually. - NodePrefs: home_pages_mask uint16_t (bit per page, 0=all visible) - HomeScreen: isPageVisible/navPage skip hidden pages; dots indicator counts only visible pages; enforces visible page on re-entry - SettingsScreen: SECTION_HOME_PAGES with per-page ON/OFF toggles - DataStore: persisted at offset 1598 - Default: all pages visible (0x01FF) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
52 lines
2.4 KiB
C++
52 lines
2.4 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 buzzer_volume; // 0=min..4=max, default 4
|
|
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 rx_boosted_gain; // SX126x RX boosted gain mode (0=power saving, 1=boosted)
|
|
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 = direct (0 hops), N = up to N-1 hops (max 64)
|
|
char default_scope_name[31];
|
|
uint8_t default_scope_key[16];
|
|
uint8_t display_brightness; // 0=min..4=max, default 2 (medium)
|
|
uint16_t auto_off_secs; // display auto-off: 0=never, else seconds (default 15)
|
|
int8_t tz_offset_hours; // timezone offset from UTC, -12..+14 (default 0)
|
|
uint16_t low_batt_mv; // auto-shutdown threshold: 0=disabled, 3000-3500 mV
|
|
uint8_t batt_display_mode; // 0=icon, 1=percent, 2=voltage
|
|
char custom_msgs[10][140]; // user-defined quick messages (supports {loc}, {time})
|
|
uint64_t ch_notif_override; // bitmask: bit i = channel i has explicit notification setting
|
|
uint64_t ch_notif_muted; // bitmask: bit i = channel i muted (only if override bit set)
|
|
uint8_t dm_show_all; // 0=favourites only (default), 1=all chat contacts
|
|
uint8_t room_fav_only; // 0=all room servers (default), 1=favourites only
|
|
uint8_t ringtone_bpm_idx; // index into {60,90,120,150,180}
|
|
uint8_t ringtone_len; // number of notes in custom ringtone (0 = use default)
|
|
uint8_t ringtone_notes[32]; // packed: bits0-2=pitch, bits3-4=octave-4, bits5-6=dur_idx
|
|
uint16_t home_pages_mask; // bitmask of visible home pages (bit0=Clock..bit8=Shutdown); 0=all visible
|
|
}; |