diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 185ea0744..e41a0e80b 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -550,7 +550,6 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) config.lora.tx_enabled = true; // FIXME: maybe false in the future, and setting region to enable it. (unset region forces it off) config.lora.override_duty_cycle = false; - config.lora.config_ok_to_mqtt = false; #if HAS_TFT // For the devices that support MUI, default to that config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_COLOR; @@ -585,6 +584,11 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) config.lora.ignore_mqtt = USERPREFS_CONFIG_LORA_IGNORE_MQTT; #else config.lora.ignore_mqtt = false; +#endif +#ifdef USERPREFS_CONFIG_LORA_OK_MQTT + config.lora.config_ok_to_mqtt = USERPREFS_CONFIG_LORA_OK_MQTT; +#else + config.lora.config_ok_to_mqtt = false; #endif // Initialize admin_key_count to zero byte numAdminKeys = 0; diff --git a/userPrefs.jsonc b/userPrefs.jsonc index 3da8e7ba6..43abd02e9 100644 --- a/userPrefs.jsonc +++ b/userPrefs.jsonc @@ -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_CONFIG_LORA_OK_MQTT": "false", // "USERPREFS_CONFIG_LORA_REGION": "meshtastic_Config_LoRaConfig_RegionCode_US", // "USERPREFS_CONFIG_OWNER_LONG_NAME": "My Long Name", // "USERPREFS_CONFIG_OWNER_SHORT_NAME": "MLN",