Add lora OK_TO_MQTT to userprefs

This commit is contained in:
oscgonfer 2025-07-17 17:47:39 +02:00
parent 39716ed1ba
commit 3314c2a133
2 changed files with 6 additions and 1 deletions

View File

@ -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;

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_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",