mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-01 13:16:36 +00:00
added some additional userPrefs options
This commit is contained in:
parent
598cfcc081
commit
00fde9ba8f
@ -555,7 +555,11 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
|
||||
#else
|
||||
config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;
|
||||
#endif
|
||||
#ifdef USERPREFS_CONFIG_SMART_POSITION_ENABLED
|
||||
config.position.position_broadcast_smart_enabled = USERPREFS_CONFIG_SMART_POSITION_ENABLED;
|
||||
#else
|
||||
config.position.position_broadcast_smart_enabled = true;
|
||||
#endif
|
||||
config.position.broadcast_smart_minimum_distance = 100;
|
||||
config.position.broadcast_smart_minimum_interval_secs = 30;
|
||||
if (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER)
|
||||
@ -618,8 +622,16 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
|
||||
|
||||
void NodeDB::initConfigIntervals()
|
||||
{
|
||||
#ifdef USERPREFS_CONFIG_GPS_UPDATE_INTERVAL
|
||||
config.position.gps_update_interval = USERPREFS_CONFIG_GPS_UPDATE_INTERVAL;
|
||||
#else
|
||||
config.position.gps_update_interval = default_gps_update_interval;
|
||||
#endif
|
||||
#ifdef USERPREFS_CONFIG_POSITION_BROADCAST_INTERVAL
|
||||
config.position.position_broadcast_secs = USERPREFS_CONFIG_POSITION_BROADCAST_INTERVAL;
|
||||
#else
|
||||
config.position.position_broadcast_secs = default_broadcast_interval_secs;
|
||||
#endif
|
||||
|
||||
config.power.ls_secs = default_ls_secs;
|
||||
config.power.min_wake_secs = default_min_wake_secs;
|
||||
@ -761,10 +773,18 @@ void NodeDB::installRoleDefaults(meshtastic_Config_DeviceConfig_Role role)
|
||||
void NodeDB::initModuleConfigIntervals()
|
||||
{
|
||||
// Zero out telemetry intervals so that they coalesce to defaults in Default.h
|
||||
#ifdef USERPREFS_CONFIG_MODULES_TELEMETRY_DEVICE_METRICS_UPDATE
|
||||
moduleConfig.telemetry.device_update_interval = USERPREFS_CONFIG_MODULES_TELEMETRY_DEVICE_METRICS_UPDATE;
|
||||
#else
|
||||
moduleConfig.telemetry.device_update_interval = 0;
|
||||
#endif
|
||||
moduleConfig.telemetry.environment_update_interval = 0;
|
||||
moduleConfig.telemetry.air_quality_interval = 0;
|
||||
#ifdef USERPREFS_CONFIG_MODULES_TELEMETRY_POWER_METRICS_UPDATE
|
||||
moduleConfig.telemetry.power_update_interval = USERPREFS_CONFIG_MODULES_TELEMETRY_POWER_METRICS_UPDATE;
|
||||
#else
|
||||
moduleConfig.telemetry.power_update_interval = 0;
|
||||
#endif
|
||||
moduleConfig.telemetry.health_update_interval = 0;
|
||||
moduleConfig.neighbor_info.update_interval = 0;
|
||||
moduleConfig.paxcounter.paxcounter_update_interval = 0;
|
||||
|
@ -17,18 +17,21 @@
|
||||
// "USERPREFS_CHANNEL_2_PSK": "{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }",
|
||||
// "USERPREFS_CHANNEL_2_UPLINK_ENABLED": "true",
|
||||
// "USERPREFS_CONFIG_GPS_MODE": "meshtastic_Config_PositionConfig_GpsMode_ENABLED",
|
||||
// "USERPREFS_CONFIG_LORA_IGNORE_MQTT": "true",
|
||||
// "USERPREFS_CONFIG_LORA_REGION": "meshtastic_Config_LoRaConfig_RegionCode_US",
|
||||
// "USERPREFS_CONFIG_OWNER_LONG_NAME": "My Long Name",
|
||||
// "USERPREFS_CONFIG_OWNER_SHORT_NAME": "MLN",
|
||||
// "USERPREFS_EVENT_MODE": "1",
|
||||
// "USERPREFS_FIXED_BLUETOOTH": "121212",
|
||||
// "USERPREFS_FIXED_GPS": "",
|
||||
// "USERPREFS_FIXED_GPS_ALT": "0",
|
||||
// "USERPREFS_FIXED_GPS_LAT": "48.85873920",
|
||||
// "USERPREFS_FIXED_GPS_LON": "2.294508368",
|
||||
// "USERPREFS_CONFIG_SMART_POSITION_ENABLED": "false",
|
||||
// "USERPREFS_CONFIG_GPS_UPDATE_INTERVAL": "600",
|
||||
// "USERPREFS_CONFIG_POSITION_BROADCAST_INTERVAL": "1800",
|
||||
// "USERPREFS_CONFIG_LORA_IGNORE_MQTT": "true",
|
||||
// "USERPREFS_CONFIG_LORA_REGION": "meshtastic_Config_LoRaConfig_RegionCode_US",
|
||||
// "USERPREFS_LORACONFIG_CHANNEL_NUM": "31",
|
||||
// "USERPREFS_LORACONFIG_MODEM_PRESET": "meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST",
|
||||
// "USERPREFS_CONFIG_OWNER_LONG_NAME": "My Long Name",
|
||||
// "USERPREFS_CONFIG_OWNER_SHORT_NAME": "MLN",
|
||||
// "USERPREFS_EVENT_MODE": "1",
|
||||
// "USERPREFS_FIXED_BLUETOOTH": "121212",
|
||||
"USERPREFS_TZ_STRING": "tzplaceholder "
|
||||
// "USERPREFS_USE_ADMIN_KEY_0": "{ 0xcd, 0xc0, 0xb4, 0x3c, 0x53, 0x24, 0xdf, 0x13, 0xca, 0x5a, 0xa6, 0x0c, 0x0d, 0xec, 0x85, 0x5a, 0x4c, 0xf6, 0x1a, 0x96, 0x04, 0x1a, 0x3e, 0xfc, 0xbb, 0x8e, 0x33, 0x71, 0xe5, 0xfc, 0xff, 0x3c }",
|
||||
// "USERPREFS_USE_ADMIN_KEY_1": "{}",
|
||||
@ -38,4 +41,6 @@
|
||||
// "USERPREFS_OEM_IMAGE_WIDTH": "50",
|
||||
// "USERPREFS_OEM_IMAGE_HEIGHT": "28",
|
||||
// "USERPREFS_OEM_IMAGE_DATA": "{ 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0x61, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0x67, 0x00, 0x00, 0x00, 0x18, 0x1F, 0xF0, 0x67, 0x00, 0x00, 0x00, 0x30, 0x1F, 0xF8, 0x33, 0x00, 0x00, 0x00, 0x30, 0x00, 0xFC, 0x31, 0x00, 0x00, 0x00, 0x60, 0x00, 0xFE, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x7E, 0x18, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x3F, 0x0C, 0x00, 0x00, 0x00, 0xC0, 0x80, 0x1F, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x81, 0x1F, 0x06, 0x00, 0x00, 0x00, 0x80, 0xC1, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xE6, 0x8F, 0x01, 0x00, 0x00, 0x00, 0x00, 0xEE, 0xC7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00}"
|
||||
// "USERPREFS_CONFIG_MODULES_TELEMETRY_DEVICE_METRICS_UPDATE": "900",
|
||||
// "USERPREFS_CONFIG_MODULES_TELEMETRY_POWER_METRICS_UPDATE": "900",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user