mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-12 16:10:48 +00:00
Merge branch 'apollo' of github.com:meshtastic/firmware into apollo
This commit is contained in:
commit
534845450b
@ -249,7 +249,7 @@ ProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp
|
|||||||
|
|
||||||
if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT ||
|
if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT ||
|
||||||
moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE) {
|
moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE) {
|
||||||
serialPrint->printf("%s", p.payload.bytes);
|
serialPrint->write(p.payload.bytes, p.payload.size);
|
||||||
} else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG) {
|
} else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG) {
|
||||||
meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(getFrom(&mp));
|
meshtastic_NodeInfoLite *node = nodeDB.getMeshNode(getFrom(&mp));
|
||||||
String sender = (node && node->has_user) ? node->user.short_name : "???";
|
String sender = (node && node->has_user) ? node->user.short_name : "???";
|
||||||
|
@ -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