Add convenience userpref for disabling lora during development and testing

This commit is contained in:
Ben Meadors
2026-03-07 11:13:55 -06:00
parent 398d1adea1
commit 5d12edbe07
2 changed files with 5 additions and 0 deletions

View File

@@ -1302,6 +1302,10 @@ void NodeDB::loadFromDisk()
RadioInterface::bootstrapLoRaConfigFromPreset(config.lora);
}
#if defined(USERPREFS_LORA_TX_DISABLED) && USERPREFS_LORA_TX_DISABLED
config.lora.tx_enabled = false;
#endif
if (backupSecurity.private_key.size > 0) {
LOG_DEBUG("Restoring backup of security config");
config.security = backupSecurity;

View File

@@ -18,6 +18,7 @@
// "USERPREFS_CHANNEL_2_UPLINK_ENABLED": "false",
// "USERPREFS_CONFIG_GPS_MODE": "meshtastic_Config_PositionConfig_GpsMode_ENABLED",
// "USERPREFS_CONFIG_LORA_IGNORE_MQTT": "true",
// "USERPREFS_LORA_TX_DISABLED": "1", // If set, forces config.lora.tx_enabled=false during lora bootstrap
// "USERPREFS_CONFIG_LORA_REGION": "meshtastic_Config_LoRaConfig_RegionCode_US",
// "USERPREFS_CONFIG_OWNER_LONG_NAME": "My Long Name",
// "USERPREFS_CONFIG_OWNER_SHORT_NAME": "MLN",