mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-10 23:47:12 +00:00
parent
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
|
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
|
||||||
|
|
||||||
@REM cd ../src/mesh/generated/meshtastic
|
|
||||||
@REM sed -i 's/#include "meshtastic/#include "./g' *
|
|
||||||
@REM sed -i 's/meshtastic_//g' *
|
|
||||||
|
@ -19,9 +19,9 @@ const int reconnectMax = 5;
|
|||||||
|
|
||||||
MQTT *mqtt;
|
MQTT *mqtt;
|
||||||
|
|
||||||
std::string statusTopic = "msh/2/stat/";
|
std::string statusTopic = "/2/stat/";
|
||||||
std::string cryptTopic = "msh/2/c/"; // msh/2/c/CHANNELID/NODEID
|
std::string cryptTopic = "/2/c/"; // msh/2/c/CHANNELID/NODEID
|
||||||
std::string jsonTopic = "msh/2/json/"; // msh/2/json/CHANNELID/NODEID
|
std::string jsonTopic = "/2/json/"; // msh/2/json/CHANNELID/NODEID
|
||||||
|
|
||||||
static MemoryDynamic<meshtastic_ServiceEnvelope> staticMqttPool;
|
static MemoryDynamic<meshtastic_ServiceEnvelope> staticMqttPool;
|
||||||
|
|
||||||
@ -164,6 +164,16 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), pubSub(mqttClient), mqttQueue(MAX_
|
|||||||
assert(!mqtt);
|
assert(!mqtt);
|
||||||
mqtt = this;
|
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);
|
pubSub.setCallback(mqttCallback);
|
||||||
|
|
||||||
// preflightSleepObserver.observe(&preflightSleep);
|
// preflightSleepObserver.observe(&preflightSleep);
|
||||||
|
Loading…
Reference in New Issue
Block a user