mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Use user preferences root topic if present
This commit is contained in:
@@ -776,7 +776,11 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
initRegion();
|
initRegion();
|
||||||
|
|
||||||
// subscribe to appropriate MQTT root topic for this region
|
// subscribe to appropriate MQTT root topic for this region
|
||||||
|
#ifdef USERPREFS_MQTT_ROOT_TOPIC
|
||||||
|
sprintf(moduleConfig.mqtt.root, "%s/%s", USERPREFS_MQTT_ROOT_TOPIC, myRegion->name);
|
||||||
|
#else
|
||||||
sprintf(moduleConfig.mqtt.root, "%s/%s", default_mqtt_root, myRegion->name);
|
sprintf(moduleConfig.mqtt.root, "%s/%s", default_mqtt_root, myRegion->name);
|
||||||
|
#endif
|
||||||
changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG;
|
changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user