Add tx_power to userprefs (#10889)

This commit is contained in:
Jonathan Bennett
2026-07-05 16:04:04 -05:00
committed by GitHub
co-authored by GitHub
parent b50da75070
commit fe6bf91343
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -87,6 +87,9 @@ void Channels::initDefaultLoraConfig()
loraConfig.tx_power = 0; // default
loraConfig.channel_num = 0;
#ifdef USERPREFS_LORACONFIG_TX_POWER
loraConfig.tx_power = USERPREFS_LORACONFIG_TX_POWER;
#endif
#ifdef USERPREFS_LORACONFIG_MODEM_PRESET
loraConfig.modem_preset = USERPREFS_LORACONFIG_MODEM_PRESET;
#endif
+4
View File
@@ -914,6 +914,10 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;
#endif
#ifdef USERPREFS_LORACONFIG_TX_POWER
config.lora.tx_power = USERPREFS_LORACONFIG_TX_POWER;
#endif
#ifdef USERPREFS_LORACONFIG_MODEM_PRESET
config.lora.modem_preset = USERPREFS_LORACONFIG_MODEM_PRESET;
#else
+1
View File
@@ -38,6 +38,7 @@
// "USERPREFS_CONFIG_ENV_TELEM_UPDATE_INTERVAL": "900", // Environment telemetry update interval in seconds
// "USERPREFS_CONFIG_ENVIRONMENT_MEASUREMENT_ENABLED": "1", // Force BMP280/sensor reads + LoRa broadcast on first boot
// "USERPREFS_LORACONFIG_CHANNEL_NUM": "31",
// "USERPREFS_LORACONFIG_TX_POWER": "0",
// "USERPREFS_LORACONFIG_MODEM_PRESET": "meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST",
// "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": "{}",