mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2025-12-06 07:42:00 +01:00
Update TaskMQTT.cpp
This commit is contained in:
parent
4f0b843cf6
commit
fb806206ac
|
|
@ -30,13 +30,13 @@ bool MQTTTask::loop(System &system) {
|
||||||
std::shared_ptr<APRSMessage> msg = _toMQTT.getElement();
|
std::shared_ptr<APRSMessage> msg = _toMQTT.getElement();
|
||||||
|
|
||||||
DynamicJsonDocument data(1024);
|
DynamicJsonDocument data(1024);
|
||||||
data["Source"] = msg->getSource();
|
data["source"] = msg->getSource();
|
||||||
data["Destination"] = msg->getDestination();
|
data["destination"] = msg->getDestination();
|
||||||
data["Path"] = msg->getPath();
|
data["path"] = msg->getPath();
|
||||||
data["Type"] = msg->getType().toString();
|
data["type"] = msg->getType().toString();
|
||||||
String body = msg->getBody()->encode();
|
String body = msg->getBody()->encode();
|
||||||
body.replace("\n", "");
|
body.replace("\n", "");
|
||||||
data["Data"] = body;
|
data["data"] = body;
|
||||||
|
|
||||||
String r;
|
String r;
|
||||||
serializeJson(data, r);
|
serializeJson(data, r);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue