mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-15 09:32:08 +00:00
Adds DOP fields to JSON MQTT output (#2671)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
5a5af4707c
commit
939a359e7e
@ -607,6 +607,15 @@ std::string MQTT::meshPacketToJson(meshtastic_MeshPacket *mp)
|
|||||||
if (int(decoded->sats_in_view)) {
|
if (int(decoded->sats_in_view)) {
|
||||||
msgPayload["sats_in_view"] = new JSONValue((int)decoded->sats_in_view);
|
msgPayload["sats_in_view"] = new JSONValue((int)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);
|
jsonObj["payload"] = new JSONValue(msgPayload);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR("Error decoding protobuf for position message!\n");
|
LOG_ERROR("Error decoding protobuf for position message!\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user