kopia lustrzana https://github.com/meshtastic/firmware
rodzic
d4e42898b1
commit
43cff7adc9
|
@ -1,5 +1 @@
|
|||
cd protobufs && ..\nanopb-0.4.7\generator-bin\protoc.exe --nanopb_out=-v:..\src\mesh\generated -I=..\protobufs ..\protobufs\meshtastic\*.proto
|
||||
|
||||
@REM cd ../src/mesh/generated/meshtastic
|
||||
@REM sed -i 's/#include "meshtastic/#include "./g' *
|
||||
@REM sed -i 's/meshtastic_//g' *
|
||||
cd protobufs && ..\nanopb-0.4.7\generator-bin\protoc.exe --experimental_allow_proto3_optional --nanopb_out=-v:..\src\mesh\generated -I=..\protobufs ..\protobufs\meshtastic\*.proto
|
||||
|
|
|
@ -19,9 +19,9 @@ const int reconnectMax = 5;
|
|||
|
||||
MQTT *mqtt;
|
||||
|
||||
std::string statusTopic = "msh/2/stat/";
|
||||
std::string cryptTopic = "msh/2/c/"; // msh/2/c/CHANNELID/NODEID
|
||||
std::string jsonTopic = "msh/2/json/"; // msh/2/json/CHANNELID/NODEID
|
||||
std::string statusTopic = "/2/stat/";
|
||||
std::string cryptTopic = "/2/c/"; // msh/2/c/CHANNELID/NODEID
|
||||
std::string jsonTopic = "/2/json/"; // msh/2/json/CHANNELID/NODEID
|
||||
|
||||
static MemoryDynamic<meshtastic_ServiceEnvelope> staticMqttPool;
|
||||
|
||||
|
@ -164,6 +164,16 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), pubSub(mqttClient), mqttQueue(MAX_
|
|||
assert(!mqtt);
|
||||
mqtt = this;
|
||||
|
||||
if (moduleConfig.mqtt.root) {
|
||||
statusTopic = moduleConfig.mqtt.root + statusTopic;
|
||||
cryptTopic = moduleConfig.mqtt.root + cryptTopic;
|
||||
jsonTopic = moduleConfig.mqtt.root + jsonTopic;
|
||||
} else {
|
||||
statusTopic = "msh" + statusTopic;
|
||||
cryptTopic = "msh" + cryptTopic;
|
||||
jsonTopic = "msh" + jsonTopic;
|
||||
}
|
||||
|
||||
pubSub.setCallback(mqttCallback);
|
||||
|
||||
// preflightSleepObserver.observe(&preflightSleep);
|
||||
|
|
Ładowanie…
Reference in New Issue