Merge remote-tracking branch 'origin/master' into 2.2-working-changes

This commit is contained in:
Ben Meadors
2023-07-31 18:54:53 -05:00
5 changed files with 14 additions and 3 deletions

View File

@@ -607,6 +607,15 @@ std::string MQTT::meshPacketToJson(meshtastic_MeshPacket *mp)
if (int(decoded->sats_in_view)) {
msgPayload["sats_in_view"] = new JSONValue((uint)decoded->sats_in_view);
}
if ((int)decoded->PDOP) {
msgPayload["PDOP"] = new JSONValue((int)decoded->PDOP);
}
if ((int)decoded->HDOP) {
msgPayload["HDOP"] = new JSONValue((int)decoded->HDOP);
}
if ((int)decoded->VDOP) {
msgPayload["VDOP"] = new JSONValue((int)decoded->VDOP);
}
jsonObj["payload"] = new JSONValue(msgPayload);
} else {
LOG_ERROR("Error decoding protobuf for position message!\n");